mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 04:53:06 +01:00
IDL C#: Added flag comments.
This commit is contained in:
@@ -328,7 +328,7 @@ flag.Reset { bits = 32 }
|
||||
.Maxanisotropy (9) --- Turn on/off max anisotropy.
|
||||
.Capture (10) --- Begin screen capture.
|
||||
.FlushAfterRender (14) --- Flush rendering after submitting to GPU.
|
||||
.FlipAfterRender (15) --- This flag specifies where flip occurs. Default behavior is that flip occurs before rendering new frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
|
||||
.FlipAfterRender (15) --- This flag specifies where flip occurs. Default behavior is that flip occurs before rendering new frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
|
||||
.SrgbBackbuffer (16) --- Enable sRGB backbuffer.
|
||||
.Hdr10 (17) --- Enable HDR10 rendering.
|
||||
.Hidpi (18) --- Enable HiDPI rendering.
|
||||
|
||||
@@ -169,7 +169,12 @@ local function FlagBlock(typ)
|
||||
end
|
||||
|
||||
yield("\t/// <summary>")
|
||||
yield("\t/// " .. flag.comment)
|
||||
if (type(flag.comment) == "table") then
|
||||
comment = table.concat(flag.comment, "\n\t\t/// ")
|
||||
else
|
||||
comment = flag.comment
|
||||
end
|
||||
yield("\t/// " .. comment)
|
||||
yield("\t/// </summary>")
|
||||
end
|
||||
|
||||
@@ -291,23 +296,35 @@ function converter.types(typ)
|
||||
end
|
||||
end
|
||||
lookup[flagName] = value
|
||||
table.insert(flags, {
|
||||
name = flagName,
|
||||
value = value,
|
||||
})
|
||||
if flag.comment ~= nil then
|
||||
table.insert(flags, {
|
||||
name = flagName,
|
||||
value = value,
|
||||
comment = flag.comment,
|
||||
})
|
||||
else
|
||||
table.insert(flags, {
|
||||
name = flagName,
|
||||
value = value,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
if typ.shift then
|
||||
table.insert(flags, {
|
||||
name = name .. "Shift",
|
||||
value = typ.shift,
|
||||
format = "%d",
|
||||
comment = typ.comment,
|
||||
})
|
||||
end
|
||||
|
||||
if typ.mask then
|
||||
-- generate Mask
|
||||
table.insert(flags, {
|
||||
name = name .. "Mask",
|
||||
value = typ.mask,
|
||||
comment = typ.comment,
|
||||
})
|
||||
lookup[name .. "Mask"] = typ.mask
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user