Error Handling
OpenGL ES commands incorrectly used by applications generate an error code. This error code is recorded and can be queried using glGetError. No other errors will be recorded until the application has queried the first error code using glGetError. Once the error code has been queried, the current error code is reset to GL_NO_ERROR. The command that generated the error is ignored and does not affect the OpenGL ES state except for the GL_OUT_OF_MEMORY error described later in this section.
The glGetError command is described next.
Table 1-3 lists the basic error codes and their description. Other error codes besides the basic ones listed in this table are described in the chapters that cover OpenGL ES commands that generate these specific errors.
Table 1-3 OpenGL ES Basic Error Codes
Error Code |
Description |
GL_NO_ERROR |
No error has been generated since the last call to glGetError. |
GL_INVALID_ENUM |
A GLenum argument is out of range. The command that generated the error is ignored. |
GL_INVALID_VALUE |
A numeric argument is out of range. The command that generated the error is ignored. |
GL_INVALID_OPERATION |
The specific command cannot be performed in the current OpenGL ES state. The command that generated the error is ignored. |
GL_OUT_OF_MEMORY |
There is insufficient memory to execute this command. The state of the OpenGL ES pipeline is considered to be undefined if this error is encountered except for the current error code. |