Skip to content

Instantly share code, notes, and snippets.

@xaxxon
Created April 6, 2016 06:06
Show Gist options
  • Save xaxxon/33b6900a675427271432ca566a7f7dcd to your computer and use it in GitHub Desktop.
Save xaxxon/33b6900a675427271432ca566a7f7dcd 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