|
|
@@ -4287,10 +4287,10 @@ BGFX_C_API void bgfx_update_texture_cube(bgfx_texture_handle_t _handle, uint16_t
|
|
|
bgfx::updateTextureCube(handle.cpp, _layer, _side, _mip, _x, _y, _width, _height, (const bgfx::Memory*)_mem, _pitch);
|
|
|
}
|
|
|
|
|
|
-BGFX_C_API uint32_t bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data)
|
|
|
+BGFX_C_API uint32_t bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data, uint8_t _mip)
|
|
|
{
|
|
|
union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle };
|
|
|
- return bgfx::readTexture(handle.cpp, _data);
|
|
|
+ return bgfx::readTexture(handle.cpp, _data, _mip);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API uint32_t bgfx_read_frame_buffer(bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, void* _data)
|
|
|
@@ -4772,6 +4772,8 @@ BGFX_C_API bgfx_interface_vtbl_t* bgfx_get_interface(uint32_t _version)
|
|
|
BGFX_IMPORT_FUNC(update_texture_2d) \
|
|
|
BGFX_IMPORT_FUNC(update_texture_3d) \
|
|
|
BGFX_IMPORT_FUNC(update_texture_cube) \
|
|
|
+ BGFX_IMPORT_FUNC(read_texture) \
|
|
|
+ BGFX_IMPORT_FUNC(read_frame_buffer) \
|
|
|
BGFX_IMPORT_FUNC(destroy_texture) \
|
|
|
BGFX_IMPORT_FUNC(create_frame_buffer) \
|
|
|
BGFX_IMPORT_FUNC(create_frame_buffer_scaled) \
|