فهرست منبع

GL: Cleanup FBO on destroy.

Branimir Karadžić 10 سال پیش
والد
کامیت
f3a17da8a8
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/renderer_gl.cpp

+ 1 - 1
src/renderer_gl.cpp

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