commit 2b429b044904e0bb56330ed041cb367decbb6c7d parent 21b2921ef7a5a17955bbd6bef696f29b0956c4ff Author: Michael Savage <mikejsavage@gmail.com> Date: Sat Aug 1 23:21:43 +0200 Exit on high severity OpenGL errors Diffstat:
gl.cc | | | 6 | ++++++ |
diff --git a/gl.cc b/gl.cc @@ -1,3 +1,4 @@ +#include <stdlib.h> #include <err.h> #include <GL/glew.h> #include <GLFW/glfw3.h> @@ -52,7 +53,12 @@ void gl_error_printer( type_string( type ), severity_string( severity ), message ); + + if( severity == GL_DEBUG_SEVERITY_HIGH ) { + exit( 1 ); + } } + void glfw_error_printer( const int code, const char * const message ) { warnx( "GLFW error %d: %s", code, message ); }