|
|
(5 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| In OpenGL, the function '''glGetError()''' tells you if an error has occurred in a program; for example, if you pass an invalid value to a function. When an error occurs, an error code is saved by the implementation. This error code will be the return value of '''glGetError()''' next time it is called.
| | #REDIRECT [[OpenGL Error#Meaning of errors]] |
| | |
| '''Error Codes''' returned by <code>glGetError()</code>:
| |
| | |
| * {{code|GL_INVALID_ENUM}}, 0x0500: 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.
| |
| * {{code|GL_INVALID_VALUE}}, 0x0501: Given when a value parameter is not a leval 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.
| |
| * {{code|GL_INVALID_OPERATION}}, 0x0502: 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.
| |
| * {{code|GL_OUT_OF_MEMORY}}, 0x0503: 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.
| |
| * {{code|GL_INVALID_FRAMEBUFFER_OPERATION}}, 0x0506: Given when doing anything that would attempt to read from or write/render to a framebuffer that is [[Framebuffer Objects#Framebuffer Completeness|not complete, as defined here]].
| |
| * {{code|GL_STACK_OVERFLOW}}<sup>1</sup>, 0x0503: Given when a stack pushing operation cannot be done because it would overflow the limit of that stack's size.
| |
| * {{code|GL_STACK_UNDERFLOW}}<sup>1</sup>, 0x0504: Given when a stack popping operation cannot be done because the stack is already at its lowest point.
| |
| * {{code|GL_TABLE_TOO_LARGE}}<sup>1</sup>, 0x8031: Part of the ARB_imaging extension.
| |
| | |
| <sup>1</sup>: These error codes are [[Deprecation|deprecated]] in 3.0 and removed in 3.1 [[Core And Compatibility in Contexts|core]] and above.
| |
| | |
| [[Category: General OpenGL]]
| |