IDL: Fixed functions that require _this.

This commit is contained in:
Бранимир Караџић
2019-07-05 08:19:45 -07:00
parent 4a96919315
commit 6c022fcc58
3 changed files with 73 additions and 58 deletions

View File

@@ -272,6 +272,21 @@ function converter.funcs(func)
local first = ""
local args = "("
if func.this ~= nil then
local thisType = func.this:gsub("const ", "")
if thisType == "bgfx_encoder_t*" then
thisType = "Encoder*"
elseif thisType == "bgfx_attachment_t*" then
thisType = "Attachment*"
elseif thisType == "bgfx_vertex_decl_t*" then
thisType = "VertexDecl*"
end
args = args .. thisType .. " " .. "_this"
first = ", "
end
for _, arg in ipairs(func.args) do
local argtype = convert_type(arg)