Print OpenGL error and description
Categories: iOS, OpenGL on May.08, 2012
Print OpenGL error:
1 2 3 4 | GLenum err = glGetError(); if (err != GL_NO_ERROR) { NSLog(@"Error glGetError: glError: 0x%04X", err); } |
GL_INVALID_ENUM, 0×0500: Given when an enumeration parameter is not a legal enumeration for that function. This is given only for local problems; if the spec allows the enumeration in certain circumstances, and other parameters or state dictate those circumstances, then GL_INVALID_OPERATION is the result instead.
GL_INVALID_VALUE, 0×0501: Given when a value parameter is not a legal value for that function. This is only given for local problems; if the spec allows the value in certain circumstances, and other parameters or state dictate those circumstances, then GL_INVALID_OPERATION is the result instead.
GL_INVALID_OPERATION, 0×0502: Given when the set of state for a command is not legal for the parameters given to that command. It is also given for commands where combinations of parameters define what the legal parameters are.
GL_OUT_OF_MEMORY, 0×0503: Given when performing an operation that can allocate memory, but the memory cannot be allocated. The results of OpenGL functions that return this error are undefined; it is allowable for partial operations to happen.
GL_INVALID_FRAMEBUFFER_OPERATION, 0×0506: Given when doing anything that would attempt to read from or write/render to a framebuffer that is not complete, as defined here.
GL_STACK_OVERFLOW1, 0×0503: Given when a stack pushing operation cannot be done because it would overflow the limit of that stack’s size.
GL_STACK_UNDERFLOW1, 0×0504: Given when a stack popping operation cannot be done because the stack is already at its lowest point.
GL_TABLE_TOO_LARGE1, 0×8031: Part of the ARB_imaging extension.



