rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / xhtml / glClear.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>glClear - OpenGL 4 Reference Pages</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glClear"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glClear — clear buffers to preset values</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><p><code class="funcdef">void <b class="fsfunc">glClear</b>(</code>GLbitfield <var class="pdparam">mask</var><code>)</code>;</p></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>mask</code></em></span></dt><dd><p>
5 Bitwise OR of masks that indicate the buffers to be cleared.
6 The three masks are
7 <code class="constant">GL_COLOR_BUFFER_BIT</code>,
8 <code class="constant">GL_DEPTH_BUFFER_BIT</code>, and
9 <code class="constant">GL_STENCIL_BUFFER_BIT</code>.
10 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
11 <code class="function">glClear</code> sets the bitplane area of the window to values previously selected
12 by <code class="function">glClearColor</code>, <code class="function">glClearDepth</code>, and
13 <code class="function">glClearStencil</code>.
14 Multiple color buffers can be cleared simultaneously by selecting
15 more than one buffer at a time using <a href="glDrawBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glDrawBuffer</span></span></a>.
16 </p><p>
17 The pixel ownership test,
18 the scissor test,
19 dithering, and the buffer writemasks affect the operation of <code class="function">glClear</code>.
20 The scissor box bounds the cleared region.
21 Alpha function,
22 blend function,
23 logical operation,
24 stenciling,
25 texture mapping,
26 and depth-buffering are ignored by <code class="function">glClear</code>.
27 </p><p>
28 <code class="function">glClear</code> takes a single argument that is the bitwise OR of several
29 values indicating which buffer is to be cleared.
30 </p><p>
31 The values are as follows:
32 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_COLOR_BUFFER_BIT</code></span></dt><dd><p>
33 Indicates the buffers currently enabled for color
34 writing.
35 </p></dd><dt><span class="term"><code class="constant">GL_DEPTH_BUFFER_BIT</code></span></dt><dd><p>
36 Indicates the depth buffer.
37 </p></dd><dt><span class="term"><code class="constant">GL_STENCIL_BUFFER_BIT</code></span></dt><dd><p>
38 Indicates the stencil buffer.
39 </p></dd></dl></div><p>
40 The value to which each buffer is cleared depends on the setting of the
41 clear value for that buffer.
42 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
43 If a buffer is not present,
44 then a <code class="function">glClear</code> directed at that buffer has no effect.
45 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
46 <code class="constant">GL_INVALID_VALUE</code> is generated if any bit other than the three defined
47 bits is set in <em class="parameter"><code>mask</code></em>.
48 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
49 <a href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_DEPTH_CLEAR_VALUE</code>
50 </p><p>
51 <a href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_COLOR_CLEAR_VALUE</code>
52 </p><p>
53 <a href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_STENCIL_CLEAR_VALUE</code>
54 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
55 <code class="function">glClearColor</code>,
56 <code class="function">glClearDepth</code>,
57 <code class="function">glClearStencil</code>,
58 <a href="glColorMask.xml"><span class="citerefentry"><span class="refentrytitle">glColorMask</span></span></a>,
59 <a href="glDepthMask.xml"><span class="citerefentry"><span class="refentrytitle">glDepthMask</span></span></a>,
60 <a href="glDrawBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glDrawBuffer</span></span></a>,
61 <a href="glScissor.xml"><span class="citerefentry"><span class="refentrytitle">glScissor</span></span></a>,
62 <a href="glStencilMask.xml"><span class="citerefentry"><span class="refentrytitle">glStencilMask</span></span></a>
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>