Created
February 3, 2009 02:03
-
-
Save ewencp/57246 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// check for GL errors and print them to stderr | |
inline void glError(const char* location) | |
{ | |
GLenum e; | |
e = glGetError(); | |
if (e != GL_NO_ERROR) | |
{ | |
fprintf (stderr, "ERROR!!! %s, %s\n", location, gluErrorString(e)); | |
e = glGetError(); | |
while (e != GL_NO_ERROR) | |
{ | |
fprintf (stderr, "ERROR!!! %s, %s\n", location, gluErrorString(e)); | |
e = glGetError(); | |
} | |
} | |
// only uncomment this if you are super paranoid | |
//else fprintf (stderr, "no error %s\n", location); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment