mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Free up texture data when using renderer_null.
This commit is contained in:
parent
b86fb4cb56
commit
2b1e6790fa
1 changed files with 16 additions and 1 deletions
|
@ -105,8 +105,23 @@ namespace bgfx
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void Context::rendererCreateTexture(TextureHandle /*_handle*/, Memory* /*_mem*/, uint32_t /*_flags*/)
|
void Context::rendererCreateTexture(TextureHandle /*_handle*/, Memory* _mem, uint32_t /*_flags*/)
|
||||||
{
|
{
|
||||||
|
StreamRead stream(_mem->data, _mem->size);
|
||||||
|
|
||||||
|
uint32_t magic;
|
||||||
|
stream.read(magic);
|
||||||
|
|
||||||
|
if (BGFX_MAGIC == magic)
|
||||||
|
{
|
||||||
|
TextureInfo ti;
|
||||||
|
stream.read(ti);
|
||||||
|
|
||||||
|
if (NULL != ti.m_mem)
|
||||||
|
{
|
||||||
|
release(ti.m_mem);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Context::rendererUpdateTexture(TextureHandle /*_handle*/, uint8_t /*_mip*/, const Rect& /*_rect*/, const Memory* /*_mem*/)
|
void Context::rendererUpdateTexture(TextureHandle /*_handle*/, uint8_t /*_mip*/, const Rect& /*_rect*/, const Memory* /*_mem*/)
|
||||||
|
|
Loading…
Reference in a new issue