Fixed texture update when requested texture format doesn't match internal texture format, and simplified texture creation.

This commit is contained in:
bkaradzic
2013-09-08 21:03:03 -07:00
parent 82256fc34d
commit 488483a945
13 changed files with 697 additions and 1027 deletions

View File

@@ -105,23 +105,8 @@ namespace bgfx
{
}
void Context::rendererCreateTexture(TextureHandle /*_handle*/, Memory* _mem, uint32_t /*_flags*/)
void Context::rendererCreateTexture(TextureHandle /*_handle*/, Memory* /*_mem*/, uint32_t /*_flags*/)
{
bx::MemoryReader reader(_mem->data, _mem->size);
uint32_t magic;
bx::read(&reader, magic);
if (BGFX_CHUNK_MAGIC_TEX == magic)
{
TextureCreate tc;
bx::read(&reader, tc);
if (NULL != tc.m_mem)
{
release(tc.m_mem);
}
}
}
void Context::rendererUpdateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/)