'\" t .\" Title: glGetError .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLGETERROR" "3G" "01/03/2018" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glGetError \- return error information .SH "C SPECIFICATION" .HP \w'GLenum\ glGetError('u .BI "GLenum glGetError(" "void" ");" .SH "DESCRIPTION" .PP \fBglGetError\fR returns the value of the error flag\&. Each detectable error is assigned a numeric code and symbolic name\&. When an error occurs, the error flag is set to the appropriate error code value\&. No other errors are recorded until \fBglGetError\fR is called, the error code is returned, and the flag is reset to \fBGL_NO_ERROR\fR\&. If a call to \fBglGetError\fR returns \fBGL_NO_ERROR\fR, there has been no detectable error since the last call to \fBglGetError\fR, or since the GL was initialized\&. .PP To allow for distributed implementations, 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 \fBGL_NO_ERROR\fR when \fBglGetError\fR is called\&. If more than one flag has recorded an error, \fBglGetError\fR returns and clears an arbitrary error flag value\&. Thus, \fBglGetError\fR should always be called in a loop, until it returns \fBGL_NO_ERROR\fR, if all error flags are to be reset\&. .PP Initially, all error flags are set to \fBGL_NO_ERROR\fR\&. .PP The following errors are currently defined: .PP \fBGL_NO_ERROR\fR .RS 4 No error has been recorded\&. The value of this symbolic constant is guaranteed to be 0\&. .RE .PP \fBGL_INVALID_ENUM\fR .RS 4 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\&. .RE .PP \fBGL_INVALID_VALUE\fR .RS 4 A numeric argument is out of range\&. The offending command is ignored and has no other side effect than to set the error flag\&. .RE .PP \fBGL_INVALID_OPERATION\fR .RS 4 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\&. .RE .PP \fBGL_INVALID_FRAMEBUFFER_OPERATION\fR .RS 4 The framebuffer object is not complete\&. The offending command is ignored and has no other side effect than to set the error flag\&. .RE .PP \fBGL_OUT_OF_MEMORY\fR .RS 4 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\&. .RE .PP \fBGL_STACK_UNDERFLOW\fR .RS 4 An attempt has been made to perform an operation that would cause an internal stack to underflow\&. .RE .PP \fBGL_STACK_OVERFLOW\fR .RS 4 An attempt has been made to perform an operation that would cause an internal stack to overflow\&. .RE .PP When an error flag is set, results of a GL operation are undefined only if \fBGL_OUT_OF_MEMORY\fR 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 \fBglGetError\fR itself generates an error, it returns 0\&. .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .T& l c c c c c c c c c c c c. T{ \fBglGetError\fR T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} .TE .sp 1 .SH "SEE ALSO" .SH "COPYRIGHT" .PP Copyright \(co 1991\-2006 Silicon Graphics, Inc\&. Copyright \(co 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 \m[blue]\fBhttp://oss\&.sgi\&.com/projects/FreeB/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 1991-2006 Silicon Graphics, Inc. .br Copyright \(co 2010-2014 Khronos Group .br