OpenGL Error Codes: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
Overlay (talk | contribs)
No edit summary
Better listing and wiki-fication.
Line 1: Line 1:
Returned by <b>glGetError()</b><br>
'''Error Codes''' returned by <code>glGetError()</code>:
GL_INVALID_ENUM<br>
GL_INVALID_VALUE<br>
GL_INVALID_OPERATION<br>
GL_STACK_OVERFLOW<br>
GL_STACK_UNDERFLOW<br>
GL_OUT_OF_MEMORY<br>
GL_TABLE_TOO_LARGE (if the optional imaging subset (GL_ARB_imaging) is supported)<br>


<br>
* GL_INVALID_ENUM: given when an enumeration parameter contains an enum that is not allowed for that function.
Note : GL 3.0 is required for core FBO support.<br>
* GL_INVALID_VALUE: given when a numerical parameter does not conform to the range requirements that the function places upon it.
Returned by <b>glGetError()</b> when FBO supported<br>
* GL_INVALID_OPERATION: given when the function in question cannot be executed because of state that has been set in the context.
GL_INVALID_FRAMEBUFFER_OPERATION<br>
* GL_STACK_OVERFLOW: given when a stack pushing operation causes a stack to overflow the limit of that stack's size.
<br>
* GL_STACK_UNDERFLOW: given when a stack popping operation is given when the stack is already at its lowest point.
Note : GL 3.0 is required for core FBO support.<br>
* GL_OUT_OF_MEMORY: given when performing an operation that can allocate memory, when the memory in question cannot be allocated.
Returned by <b>glCheckFramebufferStatus(GL_FRAMEBUFFER)</b>, <b>glCheckFramebufferStatus(GL_DRAW_BUFFER)</b>, <b>glCheckFramebufferStatus(GL_READ_BUFFER)</b><br>
* GL_TABLE_TOO_LARGE (if the optional imaging subset (GL_ARB_imaging) is supported)
GL_FRAMEBUFFER_COMPLETE<br>
* GL_INVALID_FRAMEBUFFER_OPERATION
GL_FRAMEBUFFER_UNSUPPORTED<br>
 
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT<br>
[[Framebuffer Objects]] have their own error codes for codes for testing framebuffer completeness. The meaning of these codes is defined in the [[Framebuffer Objects#Framebuffer Completeness|section on framebuffer completeness]].
GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT<br>
GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS<br>
GL_FRAMEBUFFER_INCOMPLETE_FORMATS<br>
GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER<br>
GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER<br>
GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE<br>

Revision as of 02:06, 30 December 2009

Error Codes returned by glGetError():

  • GL_INVALID_ENUM: given when an enumeration parameter contains an enum that is not allowed for that function.
  • GL_INVALID_VALUE: given when a numerical parameter does not conform to the range requirements that the function places upon it.
  • GL_INVALID_OPERATION: given when the function in question cannot be executed because of state that has been set in the context.
  • GL_STACK_OVERFLOW: given when a stack pushing operation causes a stack to overflow the limit of that stack's size.
  • GL_STACK_UNDERFLOW: given when a stack popping operation is given when the stack is already at its lowest point.
  • GL_OUT_OF_MEMORY: given when performing an operation that can allocate memory, when the memory in question cannot be allocated.
  • GL_TABLE_TOO_LARGE (if the optional imaging subset (GL_ARB_imaging) is supported)
  • GL_INVALID_FRAMEBUFFER_OPERATION

Framebuffer Objects have their own error codes for codes for testing framebuffer completeness. The meaning of these codes is defined in the section on framebuffer completeness.