Created
March 8, 2013 00:29
-
-
Save wrl/5113212 to your computer and use it in GitHub Desktop.
tiny helper routine for pretty-printing glCheckFramebufferStatus()
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
static void fb_status(const char *where) | |
{ | |
switch (glCheckFramebufferStatus(GL_FRAMEBUFFER)) { | |
case GL_FRAMEBUFFER_COMPLETE: | |
printf(" :: GL_FRAMEBUFFER_COMPLETE in %s\n", where); | |
break; | |
case GL_FRAMEBUFFER_UNDEFINED: | |
printf(" :: GL_FRAMEBUFFER_UNDEFINED in %s\n", where); | |
break; | |
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: | |
printf(" :: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT in %s\n", where); | |
break; | |
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: | |
printf(" :: GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT in %s\n", where); | |
break; | |
case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER: | |
printf(" :: GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER in %s\n", where); | |
break; | |
case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER: | |
printf(" :: GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER in %s\n", where); | |
break; | |
case GL_FRAMEBUFFER_UNSUPPORTED: | |
printf(" :: GL_FRAMEBUFFER_UNSUPPORTED in %s\n", where); | |
break; | |
case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: | |
printf(" :: GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE in %s\n", where); | |
break; | |
case GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS: | |
printf(" :: GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS in %s\n", where); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment