Clean up OpenGL error callback print
This commit is contained in:
parent
24dcd35522
commit
4769397c7a
1 changed files with 7 additions and 1 deletions
|
@ -121,8 +121,14 @@ void main() \
|
||||||
|
|
||||||
static void GLAPIENTRY MessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void* userParam)
|
static void GLAPIENTRY MessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void* userParam)
|
||||||
{
|
{
|
||||||
|
(void)source;
|
||||||
|
(void)id;
|
||||||
|
(void)severity;
|
||||||
|
(void)length;
|
||||||
|
(void)userParam;
|
||||||
|
|
||||||
if (type == GL_DEBUG_TYPE_ERROR)
|
if (type == GL_DEBUG_TYPE_ERROR)
|
||||||
printf("GL CALLBACK: %s type = 0x%x, severity = 0x%x, message = %s\n", ( type == GL_DEBUG_TYPE_ERROR ? "** GL ERROR **" : "" ), type, severity, message);
|
printf("OpenGL error: %s\n", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GLuint CompileShader(const char *vertex_shader_source, const char *fragment_shader_source)
|
static GLuint CompileShader(const char *vertex_shader_source, const char *fragment_shader_source)
|
||||||
|
|
Loading…
Add table
Reference in a new issue