GL: Cleanup FBO on destroy.

This commit is contained in:
Branimir Karadžić 2015-04-14 17:02:04 -07:00
parent 74fb466e92
commit f3a17da8a8

View file

@ -4423,7 +4423,6 @@ namespace bgfx { namespace gl
if (0 != m_num) if (0 != m_num)
{ {
GL_CHECK(glDeleteFramebuffers(0 == m_fbo[1] ? 1 : 2, m_fbo) ); GL_CHECK(glDeleteFramebuffers(0 == m_fbo[1] ? 1 : 2, m_fbo) );
memset(m_fbo, 0, sizeof(m_fbo) );
m_num = 0; m_num = 0;
} }
@ -4433,6 +4432,7 @@ namespace bgfx { namespace gl
m_swapChain = NULL; m_swapChain = NULL;
} }
memset(m_fbo, 0, sizeof(m_fbo) );
uint16_t denseIdx = m_denseIdx; uint16_t denseIdx = m_denseIdx;
m_denseIdx = UINT16_MAX; m_denseIdx = UINT16_MAX;