The debugCallback callback function has several parameters, the most important of which is the debug message itself (the sixth parameter, message). For this example, we simply print the message to the standard output, but we could send it to a log file or some other destination.
The first four parameters to debugCallback describe the source, type, ID number, and severity of the message. The ID number is an unsigned integer specific to the message. The possible values for the source, type, and severity parameters are described in the following tables.
The source parameter can have any of the following values:
Source | Generated by |
GL_DEBUG_SOURCE_API | Calls to the OpenGL API |
GL_DEBUG_SOURCE_WINDOW_SYSTEM | Calls to a Windows ... |