1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

OpenGL: Only assert on high-severity errors

This commit is contained in:
reuk 2022-09-08 10:55:45 +01:00
parent 7c14c1fcd7
commit ff1d5d6da4
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -621,13 +621,13 @@ public:
if (getOpenGLVersion() >= Version { 4, 3 } && glDebugMessageCallback != nullptr)
{
glEnable (GL_DEBUG_OUTPUT);
glDebugMessageCallback ([] (GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar* message, const void*)
glDebugMessageCallback ([] (GLenum type, GLenum, GLuint, GLenum severity, GLsizei, const GLchar* message, const void*)
{
// This may reiterate issues that are also flagged by JUCE_CHECK_OPENGL_ERROR.
// The advantage of this callback is that it will catch *all* errors, even if we
// forget to check manually.
DBG ("OpenGL DBG message: " << message);
jassertfalse;
jassertquiet (type != GL_DEBUG_TYPE_ERROR && severity != GL_DEBUG_SEVERITY_HIGH);
}, nullptr);
}
#endif