Updated C3 binding script to generate C3 binding based on C3 v0.8.0 (#3720)

This commit is contained in:
Jaziel Guerrero
2026-05-28 23:38:35 -04:00
committed by GitHub
parent 5f85da1e59
commit 0d4141d03a
8 changed files with 231 additions and 217 deletions

View File

@@ -3673,6 +3673,8 @@ public static class bgfx
/// Read back texture content.
///
/// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
/// It's a texture for CPU readback, and can't be a GPU resource
/// at the same time. See `examples/30-picking`.
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
///
/// </summary>

File diff suppressed because it is too large Load Diff

View File

@@ -3626,6 +3626,8 @@ public static partial class bgfx
/// Read back texture content.
///
/// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
/// It's a texture for CPU readback, and can't be a GPU resource
/// at the same time. See `examples/30-picking`.
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
///
/// </summary>

View File

@@ -2805,6 +2805,8 @@ mixin(joinFnBinds((){
* Read back texture content.
*
* Attention: Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
* It's a texture for CPU readback, and can't be a GPU resource
* at the same time. See `examples/30-picking`.
* Attention: Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
*
Params:

View File

@@ -2882,6 +2882,8 @@ extern fn bgfx_update_texture_cube(_handle: TextureHandle, _layer: u16, _side: u
/// Read back texture content.
///
/// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
/// It's a texture for CPU readback, and can't be a GPU resource
/// at the same time. See `examples/30-picking`.
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
///
/// <param name="_handle">Texture handle.</param>

View File

@@ -3130,6 +3130,8 @@ namespace bgfx
/// @returns Frame number when the result will be available. See: `bgfx::frame`.
///
/// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
/// It's a texture for CPU readback, and can't be a GPU resource
/// at the same time. See `examples/30-picking`.
///
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
///

View File

@@ -2065,6 +2065,8 @@ BGFX_C_API void bgfx_update_texture_cube(bgfx_texture_handle_t _handle, uint16_t
* Read back texture content.
*
* @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
* It's a texture for CPU readback, and can't be a GPU resource
* at the same time. See `examples/30-picking`.
* @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
*
* @param[in] _handle Texture handle.

View File

@@ -113,16 +113,16 @@ local lastCombinedFlag
local function FlagBlock(typ)
local format = "0x%08x"
local enumType = " : const uint"
local enumType = " : inline uint"
if typ.bits == 64 then
format = "0x%016x"
enumType = " : const ulong"
enumType = " : inline ulong"
elseif typ.bits == 16 then
format = "0x%04x"
enumType = " : const ushort"
enumType = " : inline ushort"
end
yield("enum " .. typ.name .. "Flags" .. enumType)
yield("constdef " .. typ.name .. "Flags" .. enumType)
yield("{")
for idx, flag in ipairs(typ.flag) do
@@ -377,7 +377,7 @@ function converter.funcs(func)
table.insert(args, convert_type(arg) .. " " .. arg.name)
end
yield("extern fn " .. convert_type(func.ret) .. " " .. func.cname
.. "(" .. table.concat(args, ", ") .. ") @extern(\"bgfx_" .. func.cname .. "\");" )
.. "(" .. table.concat(args, ", ") .. ") @cname(\"bgfx_" .. func.cname .. "\");" )
end
function gen.write(codes, outputfile)