GLGETERROR(3G)
bestie, this is GLGETERROR(3G) β manual name 3G β and the header has a little [FIXME: manual] placeholder just vibing there. Let's get into the error-flag lore, because this one is lowkey essential. π
β¨
πΈ NAME πΈ
glGetError β return error information π
π» C SPECIFICATION π»
GLenum glGetError(void);
π§ DESCRIPTION π§
glGetError returns the value of the error flag. Every detectable error gets a numeric code and a symbolic name. When an error happens, the error flag is set to the appropriate error code value. No other errors are recorded until glGetError is called, the error code is returned, and the flag is reset to GL_NO_ERROR. If a call to glGetError returns GL_NO_ERROR, there has been no detectable error since the last call to glGetError, or since the GL was initialized. periodt. π
Because distributed implementations are a thing, there may be several error flags. If any single error flag has recorded an error, the value of that flag is returned and that flag is reset to GL_NO_ERROR when glGetError is called. If more than one flag has recorded an error, glGetError returns and clears an arbitrary error flag value. So bestie, if you want all the error flags reset, you should always call glGetError in a loop until it returns GL_NO_ERROR. iykyk. π
Initially, all error flags are set to GL_NO_ERROR. β¨
The following errors are currently defined:
GL_NO_ERRORβ No error has been recorded. The value of this symbolic constant is guaranteed to be0. πGL_INVALID_ENUMβ An unacceptable value is specified for an enumerated argument. The offending command is ignored and has no other side effect than to set the error flag. πGL_INVALID_VALUEβ A numeric argument is out of range. The offending command is ignored and has no other side effect than to set the error flag. πGL_INVALID_OPERATIONβ The specified operation is not allowed in the current state. The offending command is ignored and has no other side effect than to set the error flag. π«GL_INVALID_FRAMEBUFFER_OPERATIONβ The framebuffer object is not complete. The offending command is ignored and has no other side effect than to set the error flag. π«GL_OUT_OF_MEMORYβ There is not enough memory left to execute the command. The state of the GL is undefined, except for the state of the error flags, after this error is recorded. πGL_STACK_UNDERFLOWβ An attempt has been made to perform an operation that would cause an internal stack to underflow. π³οΈGL_STACK_OVERFLOWβ An attempt has been made to perform an operation that would cause an internal stack to overflow. π
When an error flag is set, results of a GL operation are undefined only if GL_OUT_OF_MEMORY has occurred. In all other cases, the command generating the error is ignored and has no effect on the GL state or frame buffer contents. If the generating command returns a value, it returns 0. If glGetError itself generates an error, it returns 0. no cap. π―
π VERSION SUPPORT π
The original table has Function / Feature Name and OpenGL Version columns, with glGetError supported in every listed version. Every box is a β:
- OpenGL
2.0β β - OpenGL
2.1β β - OpenGL
3.0β β - OpenGL
3.1β β - OpenGL
3.2β β - OpenGL
3.3β β - OpenGL
4.0β β - OpenGL
4.1β β - OpenGL
4.2β β - OpenGL
4.3β β - OpenGL
4.4β β - OpenGL
4.5β β
slay, she's supported everywhere on this list. πβ¨
π SEE ALSO π
No entries in this section, bestie β it's literally empty in the original. π¦
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc.
Copyright Β© 2010-2014 Khronos Group
kisses, bestie β this page came from [FIXME: source], dated 08/09/2021, and it's filed under GLGETERROR(3G). ππ¦π
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms