Skip to content

Instantly share code, notes, and snippets.

@nidefawl
Created January 19, 2016 13:17
Show Gist options
  • Save nidefawl/5b475c17fbd2e8fa60ea to your computer and use it in GitHub Desktop.
Save nidefawl/5b475c17fbd2e8fa60ea to your computer and use it in GitHub Desktop.
public static String getGlErrorString(int error_code) {
switch (error_code) {
case GL11.GL_NO_ERROR:
return "No error";
case GL11.GL_INVALID_ENUM:
return "Invalid enum";
case GL11.GL_INVALID_VALUE:
return "Invalid value";
case GL11.GL_INVALID_OPERATION:
return "Invalid operation";
case GL11.GL_STACK_OVERFLOW:
return "Stack overflow";
case GL11.GL_STACK_UNDERFLOW:
return "Stack underflow";
case GL11.GL_OUT_OF_MEMORY:
return "Out of memory";
case ARBImaging.GL_TABLE_TOO_LARGE:
return "Table too large";
case EXTFramebufferObject.GL_INVALID_FRAMEBUFFER_OPERATION_EXT:
return "Invalid framebuffer operation";
default:
return "ErrorCode " + error_code;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment