Tag Archives: Rules

Gles2.0 Chinese API glgeterror

The name of the
GLG Terror – Returns an error message
C specification
GLenum glGetError ( void ) .
describe
GlGetError returns the value of the error flag. Each detectable error is assigned a numeric code and a symbolic name. When an error occurs, the error flag is set to the corresponding error code value. No other errors are recorded before the glGetError (return error code) is called, and the flag is reset to GL_NO_ERROR. If a call to glGetError returns GL_NO_ERROR, there are no detectable errors since the last call to glGetError or since GL was initialized.
To allow a distributed implementation, there may be multiple error flags. If any single error flag records an error, it returns the value of the flag and resets the flag to GL_NO_ERROR when you call glGetError. If more than one flag records an error, glGetError returns and clears any error flag value. Therefore, if you want to reset all error flags, you should always call glGetError in the loop until it returns GL_NO_ERROR.
Initially, all error flags are set to GL_NO_ERROR.
The following errors are currently defined:
GL_NO_ERROR (0)
No errors were recorded. The value of this symbolic constant is guaranteed to be 0.
GL_INVALID_ENUM (1280).
An unacceptable value was specified for the enumeration parameter. Offending commands are ignored and have no side effects other than setting the error flag.
GL_INVALID_VALUE (1281).
The number parameter is out of range. Offending commands are ignored and have no side effects other than setting the error flag.
GL_INVALID_OPERATION (1282).
The specified operation is not allowed in the current state. Offending commands are ignored and have no side effects other than setting the error flag.
GL_INVALID_FRAMEBUFFER_OPERATION (1286).
This command attempts to render to or read from the frame buffer when the currently bound frame buffer is not in the frame buffer complete state (that is, the return value of glCheckFramebufferStatus is not GL_FRAMEBUFFER_COMPLETE). Offending commands are ignored and have no side effects other than setting the error flag.
GL_OUT_OF_MEMORY (1285).
Not enough memory to execute the command. After recording this error, the state of GL is undefined, except for the state of the error flag.
When the error flag is set, the result of a GL operation is undefined only if GL_OUT_OF_MEMORY occurs. In all other cases, the command generating the error is ignored and does not affect GL state or frame buffer content. If the generate command returns a value, it returns 0.
See also
glCheckFramebufferStatus
copyright
https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glGetError.xml
https://blog.csdn.net/flycatdeng
Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. See http://oss.sgi.com/projects/FreeB/.

Android,OpenGL ES, Graphics