small improvement

This commit is contained in:
oy 2018-12-17 17:20:01 +01:00
parent 2e63d28a2d
commit 99d12c9fbb

View file

@ -274,10 +274,7 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Destroy(const CCommandBuffer:
if(m_aTextures[pCommand->m_Slot].m_State&CTexture::STATE_TEX2D) if(m_aTextures[pCommand->m_Slot].m_State&CTexture::STATE_TEX2D)
glDeleteTextures(1, &m_aTextures[pCommand->m_Slot].m_Tex2D); glDeleteTextures(1, &m_aTextures[pCommand->m_Slot].m_Tex2D);
if(m_aTextures[pCommand->m_Slot].m_State&CTexture::STATE_TEX3D) if(m_aTextures[pCommand->m_Slot].m_State&CTexture::STATE_TEX3D)
{ glDeleteTextures(m_TextureArraySize, m_aTextures[pCommand->m_Slot].m_Tex3D);
for(int i = 0; i < m_TextureArraySize; ++i)
glDeleteTextures(1, &m_aTextures[pCommand->m_Slot].m_Tex3D[i]);
}
*m_pTextureMemoryUsage -= m_aTextures[pCommand->m_Slot].m_MemSize; *m_pTextureMemoryUsage -= m_aTextures[pCommand->m_Slot].m_MemSize;
m_aTextures[pCommand->m_Slot].m_State = CTexture::STATE_EMPTY; m_aTextures[pCommand->m_Slot].m_State = CTexture::STATE_EMPTY;
m_aTextures[pCommand->m_Slot].m_MemSize = 0; m_aTextures[pCommand->m_Slot].m_MemSize = 0;