The name of the
GLG Terror – Returns an error message
C specification
GLenum glGetError
GLG Terror – Returns an error message
C specification
GLenum glGetError
( code> void ) code>.
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/.
Read More:
- OpenGL error getting glgeterror ()
- NACOS error com.alibaba.nacos.api.exception.NacosException: failed to req API:/api//nacos/v1/ns/instance
- [Solved] com.alibaba.nacos.api.exception.NacosException: failed to req API
- Nginx redirects the interfac /API to another interface/API
- Resttemplate Chinese garbled problem – available
- Ubuntu 16.04 install Chinese input method
- Three ways of latex supporting Chinese
- Anaconda Matplotlib drawing Chinese garbled solution
- Solution of Chinese garbled code when using QT
- OpenGL function reference (Chinese version)
- How to Fix errors in Chinese input of latex
- Perfectly solve the 1366 error of saving Chinese in MySQL
- Solving the problem of Chinese garbled code in qtring
- The problem of Chinese garbled data in MySQL
- Chinese garbled fonts in win10 English system
- Solve the problem of Chinese garbled code of actibpm plug-in in idea
- Solve the error of Chinese file uploaded by springboot
- Solution of Chinese display garbled code in Git Bash
- Encapsulation of Axios and management of API interface in Vue
- Solving Chinese garbled code in Java compressed file