From f3a17da8a8139219ab0fe3a072c3a44555ee2094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 14 Apr 2015 17:02:04 -0700 Subject: [PATCH] GL: Cleanup FBO on destroy. --- src/renderer_gl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 00d4ba90..b4662e6d 100644 --- a/src/renderer_gl.cpp +++ b/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;