Fix debug callbacks on GL demos

This commit is contained in:
baldurk
2019-04-30 13:31:47 +01:00
parent f91a7509ce
commit 9c7430c305
3 changed files with 7 additions and 4 deletions
+5 -2
View File
@@ -29,7 +29,8 @@ static void APIENTRY debugCallback(GLenum source, GLenum type, GLuint id, GLenum
GLsizei length, const GLchar *message, const void *userParam)
{
// too much spam on these types
if(type != GL_DEBUG_TYPE_PERFORMANCE && type != GL_DEBUG_TYPE_OTHER)
if(type != GL_DEBUG_TYPE_PERFORMANCE && type != GL_DEBUG_TYPE_OTHER &&
source != GL_DEBUG_SOURCE_APPLICATION)
{
TEST_ERROR("Debug message: %s", message);
}
@@ -37,7 +38,9 @@ static void APIENTRY debugCallback(GLenum source, GLenum type, GLuint id, GLenum
void OpenGLGraphicsTest::PostInit()
{
if(GLAD_GL_ARB_debug_output)
glEnable(GL_FRAMEBUFFER_SRGB);
if(GLAD_GL_KHR_debug)
{
glDebugMessageCallback(&debugCallback, NULL);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
+1 -1
View File
@@ -60,7 +60,7 @@ bool OpenGLGraphicsTest::Init(int argc, char **argv)
return false;
}
glEnable(GL_FRAMEBUFFER_SRGB);
PostInit();
return true;
}
+1 -1
View File
@@ -105,7 +105,7 @@ bool OpenGLGraphicsTest::Init(int argc, char **argv)
return false;
}
glEnable(GL_FRAMEBUFFER_SRGB);
PostInit();
return true;
}