Handle textures that were created but not typed/initialised

This commit is contained in:
baldurk
2014-11-09 02:00:09 +00:00
parent b3c5587420
commit e57cf457a4
+16
View File
@@ -330,6 +330,22 @@ void GLReplay::CacheTexture(ResourceId id)
WrappedOpenGL &gl = *m_pDriver;
tex.ID = m_pDriver->GetResourceManager()->GetOriginalID(id);
if(res.curType == eGL_NONE)
{
tex.customName = false;
tex.format = ResourceFormat();
tex.dimension = 0;
tex.width = tex.height = tex.depth = 0;
tex.cubemap = false;
tex.mips = 0;
tex.arraysize = 0;
tex.numSubresources = 0;
tex.creationFlags = 0;
tex.msQual = tex.msSamp = 0;
tex.byteSize = 0;
return;
}
gl.glBindTexture(res.curType, res.resource.name);