How to use glDebugMessageControl
问题 This is based on the debug callback example from https://www.khronos.org/opengl/wiki/Debug_Output and somewhat on https://learnopengl.com/In-Practice/Debugging. Setting up the callback: void GLAPIENTRY MessageCallback( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam ) { fprintf( stderr, "GL CALLBACK: %s type = 0x%x, severity = 0x%x, message = %s\n", ( type == GL_DEBUG_TYPE_ERROR ? "** GL ERROR **" : "" ), type, severity,