From 7c81905ed2485ebce2d013313e81746e3d953156 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Sat, 21 Sep 2013 22:31:00 -0700 Subject: [PATCH] GL: Unbind VAO before using clear quad. --- src/renderer_gl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index e14af36a..a0088e74 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -2110,6 +2110,12 @@ namespace bgfx #if BGFX_CONFIG_CLEAR_QUAD if (s_renderCtx->m_useClearQuad) { + const GLuint defaultVao = s_renderCtx->m_vao; + if (0 != defaultVao) + { + GL_CHECK(glBindVertexArray(defaultVao) ); + } + GL_CHECK(glDisable(GL_SCISSOR_TEST) ); GL_CHECK(glDisable(GL_CULL_FACE) ); GL_CHECK(glDisable(GL_BLEND) );