Skip to content

Instantly share code, notes, and snippets.

@btipling
Forked from xaxxon/graphics.cpp
Created April 6, 2016 06:06
Show Gist options
  • Save btipling/5dba656537e100b8f2ae3ff5b9517ad9 to your computer and use it in GitHub Desktop.
Save btipling/5dba656537e100b8f2ae3ff5b9517ad9 to your computer and use it in GitHub Desktop.
gl error checker
void Graphics::check_error(const char * filename, int line_number) {
GLenum error;
while ((error = glGetError()) != 0) {
printf("GL Error %x: %s:%d\n", error, filename, line_number);
exit(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment