#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); printf ("%s:%u OpenGL Error %s", filename, linenum, errString); exit (-1); } /* * Check for an error from the Database API. */ check_error_db (filename, linenum); return; }