Created
July 24, 2013 20:28
-
-
Save kbenzie/6074229 to your computer and use it in GitHub Desktop.
GLenum type string convenience function
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
static const char * const glGetTypeString(GLenum type) | |
{ | |
switch (type) | |
{ | |
case GL_BYTE : return "GLbyte"; | |
case GL_UNSIGNED_BYTE : return "GLubyte"; | |
case GL_SHORT : return "GLshort"; | |
case GL_UNSIGNED_SHORT : return "GLushort"; | |
case GL_INT : return "GLint"; | |
case GL_UNSIGNED_INT : return "GLuint"; | |
case GL_FLOAT : return "GLfloat"; | |
case GL_2_BYTES : return "GL_2_BYTES"; | |
case GL_3_BYTES : return "GL_3_BYTES"; | |
case GL_4_BYTES : return "GL_4_BYTES"; | |
case GL_DOUBLE : return "GLdouble"; | |
default: return "not a GLenum type"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment