#include #include #include #include #include "check_error_db.h" void check_error (const char *filename, const unsigned int linenum) { /* * Check for an error from the OpenGL API. */ GLenum errCode = glGetError (); if (errCode != GL_NO_ERROR) { const GLubyte *errString = gluErrorString (errCode); error_at_line (EXIT_FAILURE, errno, filename, linenum, "OpenGL Error %s", errString); } /* * Check for an error from the Database API. */ check_error_db (filename, linenum); return; }