Clean up OpenGL error callback print

This commit is contained in:
Clownacy 2019-07-31 23:03:32 +00:00
parent 24dcd35522
commit 4769397c7a

View file

@ -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)