include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man3 / xhtml / glGetError.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
3 <!-- saved from url=(0013)about:internet -->
4 <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="opengl-man.css" /><title>glGetError</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glGetError"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glGetError — return error information</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><p><code class="funcdef">GLenum <b class="fsfunc">glGetError</b>(</code> <var class="pdparam">void</var><code>)</code>;</p></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
5 <code class="function">glGetError</code> returns the value of the error flag.
6 Each detectable error is assigned a numeric code and symbolic name.
7 When an error occurs,
8 the error flag is set to the appropriate error code value.
9 No other errors are recorded until <code class="function">glGetError</code> is called,
10 the error code is returned,
11 and the flag is reset to <code class="constant">GL_NO_ERROR</code>.
12 If a call to <code class="function">glGetError</code> returns <code class="constant">GL_NO_ERROR</code>,
13 there has been no detectable error since the last call to <code class="function">glGetError</code>,
14 or since the GL was initialized.
15 </p><p>
16 To allow for distributed implementations,
17 there may be several error flags.
18 If any single error flag has recorded an error,
19 the value of that flag is returned
20 and that flag is reset to <code class="constant">GL_NO_ERROR</code>
21 when <code class="function">glGetError</code> is called.
22 If more than one flag has recorded an error,
23 <code class="function">glGetError</code> returns and clears an arbitrary error flag value.
24 Thus, <code class="function">glGetError</code> should always be called in a loop,
25 until it returns <code class="constant">GL_NO_ERROR</code>,
26 if all error flags are to be reset.
27 </p><p>
28 Initially, all error flags are set to <code class="constant">GL_NO_ERROR</code>.
29 </p><p>
30 The following errors are currently defined:
31 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_NO_ERROR</code></span></dt><dd><p>
32 No error has been recorded.
33 The value of this symbolic constant is guaranteed to be 0.
34 </p></dd><dt><span class="term"><code class="constant">GL_INVALID_ENUM</code></span></dt><dd><p>
35 An unacceptable value is specified for an enumerated argument.
36 The offending command is ignored
37 and has no other side effect than to set the error flag.
38 </p></dd><dt><span class="term"><code class="constant">GL_INVALID_VALUE</code></span></dt><dd><p>
39 A numeric argument is out of range.
40 The offending command is ignored
41 and has no other side effect than to set the error flag.
42 </p></dd><dt><span class="term"><code class="constant">GL_INVALID_OPERATION</code></span></dt><dd><p>
43 The specified operation is not allowed in the current state.
44 The offending command is ignored
45 and has no other side effect than to set the error flag.
46 </p></dd><dt><span class="term"><code class="constant">GL_INVALID_FRAMEBUFFER_OPERATION</code></span></dt><dd><p>
47 The framebuffer object is not complete. The offending command
48 is ignored and has no other side effect than to set the error flag.
49 </p></dd><dt><span class="term"><code class="constant">GL_OUT_OF_MEMORY</code></span></dt><dd><p>
50 There is not enough memory left to execute the command.
51 The state of the GL is undefined,
52 except for the state of the error flags,
53 after this error is recorded.
54 </p></dd></dl></div><p>
55 When an error flag is set,
56 results of a GL operation are undefined only if <code class="constant">GL_OUT_OF_MEMORY</code>
57 has occurred.
58 In all other cases,
59 the command generating the error is ignored and has no effect on the GL state
60 or frame buffer contents.
61 If the generating command returns a value, it returns 0.
62 If <code class="function">glGetError</code> itself generates an error, it returns 0.
63 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
64 Copyright <span class="trademark"></span>© 1991-2006
65 Silicon Graphics, Inc. This document is licensed under the SGI
66 Free Software B License. For details, see
67 <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
68 </p></div></div></body></html>