diff --git a/include/bgfx/c99/bgfx.idl.h b/include/bgfx/c99/bgfx.idl.h index ada2c67c0..3502668d5 100644 --- a/include/bgfx/c99/bgfx.idl.h +++ b/include/bgfx/c99/bgfx.idl.h @@ -213,10 +213,10 @@ BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_3d(uint16_t _width, uint16_ BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_cube(uint16_t _size, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t * _mem); /**/ -BGFX_C_API void bgfx_update_texture_2d(bgfx_texture_handle_t _handle, uint16_t _layer, uint16_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t * _mem, uint16_t _pitch); +BGFX_C_API void bgfx_update_texture_2d(bgfx_texture_handle_t _handle, uint16_t _layer, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t * _mem, uint16_t _pitch); /**/ -BGFX_C_API void bgfx_update_texture_3d(bgfx_texture_handle_t _handle, uint16_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const bgfx_memory_t * _mem); +BGFX_C_API void bgfx_update_texture_3d(bgfx_texture_handle_t _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const bgfx_memory_t * _mem); /**/ BGFX_C_API void bgfx_update_texture_cube(bgfx_texture_handle_t _handle, uint16_t _layer, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t * _mem, uint16_t _pitch); @@ -619,8 +619,8 @@ typedef struct bgfx_interface_vtbl bgfx_texture_handle_t (*create_texture_2d_scaled)(bgfx_backbuffer_ratio_t _ratio, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags); bgfx_texture_handle_t (*create_texture_3d)(uint16_t _width, uint16_t _height, uint16_t _depth, bool _hasMips, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t * _mem); bgfx_texture_handle_t (*create_texture_cube)(uint16_t _size, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t * _mem); - void (*update_texture_2d)(bgfx_texture_handle_t _handle, uint16_t _layer, uint16_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t * _mem, uint16_t _pitch); - void (*update_texture_3d)(bgfx_texture_handle_t _handle, uint16_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const bgfx_memory_t * _mem); + void (*update_texture_2d)(bgfx_texture_handle_t _handle, uint16_t _layer, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t * _mem, uint16_t _pitch); + void (*update_texture_3d)(bgfx_texture_handle_t _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const bgfx_memory_t * _mem); void (*update_texture_cube)(bgfx_texture_handle_t _handle, uint16_t _layer, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t * _mem, uint16_t _pitch); uint32_t (*read_texture)(bgfx_texture_handle_t _handle, void * _data, uint8_t _mip); void (*set_texture_name)(bgfx_texture_handle_t _handle, const char * _name, int32_t _len); diff --git a/scripts/bgfx.idl b/scripts/bgfx.idl index de467c23f..5b1c789ac 100644 --- a/scripts/bgfx.idl +++ b/scripts/bgfx.idl @@ -484,7 +484,7 @@ func.updateTexture2D "void" .handle "TextureHandle" .layer "uint16_t" - .mip "uint16_t" + .mip "uint8_t" .x "uint16_t" .y "uint16_t" .width "uint16_t" @@ -495,7 +495,7 @@ func.updateTexture2D func.updateTexture3D "void" .handle "TextureHandle" - .mip "uint16_t" + .mip "uint8_t" .x "uint16_t" .y "uint16_t" .z "uint16_t" diff --git a/src/bgfx.idl.inl b/src/bgfx.idl.inl index d9af17133..74cb1fc01 100644 --- a/src/bgfx.idl.inl +++ b/src/bgfx.idl.inl @@ -438,13 +438,13 @@ BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_cube(uint16_t _size, bool _ return handle_ret.c; } -BGFX_C_API void bgfx_update_texture_2d(bgfx_texture_handle_t _handle, uint16_t _layer, uint16_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t * _mem, uint16_t _pitch) +BGFX_C_API void bgfx_update_texture_2d(bgfx_texture_handle_t _handle, uint16_t _layer, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t * _mem, uint16_t _pitch) { union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle }; bgfx::updateTexture2D(handle.cpp, _layer, _mip, _x, _y, _width, _height, (const bgfx::Memory *)_mem, _pitch); } -BGFX_C_API void bgfx_update_texture_3d(bgfx_texture_handle_t _handle, uint16_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const bgfx_memory_t * _mem) +BGFX_C_API void bgfx_update_texture_3d(bgfx_texture_handle_t _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const bgfx_memory_t * _mem) { union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle }; bgfx::updateTexture3D(handle.cpp, _mip, _x, _y, _z, _width, _height, _depth, (const bgfx::Memory *)_mem);