Created
July 1, 2020 04:25
-
-
Save KageKirin/ded495258709498351f4288a93576066 to your computer and use it in GitHub Desktop.
Safe OpenGL call
This file contains hidden or 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
| #define SAFEGL(call) (call); \ | |
| {\ | |
| GLenum err = glGetError(); \ | |
| if (err != GL_NO_ERROR) \ | |
| fprintf(stdout, "GL ERROR: 0x%x at '%s' %s:%d\n", err, #call, __FILE__, __LINE__);\ | |
| }\ | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a simple wrapper around OpenGL calls that helps with finding errors at the call site.
Usage: