29 files changed, 1185 insertions, 0 deletions
diff --git a/src/util/check_error.c b/src/util/check_error.c new file mode 100644 index 0000000..dbe5b8f --- a/dev/null +++ b/src/util/check_error.c @@ -0,0 +1,17 @@ +#include <GL/glut.h> +#include <error.h> +#include <errno.h> + +void +check_error (const char *filename, unsigned int linenum) +{ + GLenum errCode = glGetError (); + if (errCode != GL_NO_ERROR) + { + const GLubyte *errString = gluErrorString (errCode); + error_at_line (-1, errno, filename, linenum, + "OpenGL Error %s", errString); + } + + return; +} |