Fixed stale VAO issue.

This commit is contained in:
Branimir Karadžić
2016-08-18 19:02:57 -07:00
parent 3ac8943e05
commit 7b59fb716a
2 changed files with 17 additions and 8 deletions

View File

@@ -1074,6 +1074,7 @@ namespace bgfx { namespace gl
case GL_DEBUG_SEVERITY_HIGH: return "High";
case GL_DEBUG_SEVERITY_MEDIUM: return "Medium";
case GL_DEBUG_SEVERITY_LOW: return "Low";
case GL_DEBUG_SEVERITY_NOTIFICATION: return "SPAM";
default:
break;
}
@@ -1083,14 +1084,17 @@ namespace bgfx { namespace gl
void GL_APIENTRY debugProcCb(GLenum _source, GLenum _type, GLuint _id, GLenum _severity, GLsizei /*_length*/, const GLchar* _message, const void* /*_userParam*/)
{
BX_TRACE("src %s, type %s, id %d, severity %s, '%s'"
, toString(_source)
, toString(_type)
, _id
, toString(_severity)
, _message
);
BX_UNUSED(_source, _type, _id, _severity, _message);
if (GL_DEBUG_SEVERITY_NOTIFICATION != _severity)
{
BX_TRACE("src %s, type %s, id %d, severity %s, '%s'"
, toString(_source)
, toString(_type)
, _id
, toString(_severity)
, _message
);
BX_UNUSED(_source, _type, _id, _severity, _message);
}
}
GLint glGet(GLenum _pname)
@@ -5935,6 +5939,7 @@ namespace bgfx { namespace gl
if (BGFX_CLEAR_NONE != (clear.m_flags & BGFX_CLEAR_MASK) )
{
clearQuad(_clearQuad, viewState.m_rect, clear, resolutionHeight, _render->m_colorPalette);
currentVao = UINT32_MAX; // clearQuad will mess with VAO, invalidate it.
}
GL_CHECK(glDisable(GL_STENCIL_TEST) );

View File

@@ -883,6 +883,10 @@ typedef uint64_t GLuint64;
# define GL_MAX_NAME_LENGTH 0x92F6
#endif // GL_MAX_NAME_LENGTH
#ifndef GL_DEBUG_SEVERITY_NOTIFICATION
# define GL_DEBUG_SEVERITY_NOTIFICATION 0x826b
#endif // GL_DEBUG_SEVERITY_NOTIFICATION
#if BX_PLATFORM_NACL
# include "glcontext_ppapi.h"
#elif BX_PLATFORM_WINDOWS