d39ed39bc1cfd05623cd4d24efed82e977204a70
[clinton/guile-figl.git] / upstream-man-pages / man2 / xhtml / glDrawBuffer.xml
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
2 <!-- saved from url=(0013)about:internet -->
3 <?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" /><title>glDrawBuffer</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glDrawBuffer"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glDrawBuffer — specify which color buffers are to be drawn into</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glDrawBuffer</b>(</code></td><td>GLenum  </td><td><var class="pdparam">mode</var><code>)</code>;</td></tr></table></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>mode</code></em></span></dt><dd><p>
4 Specifies up to four color buffers to be drawn into.
5 Symbolic constants
6 <code class="constant">GL_NONE</code>,
7 <code class="constant">GL_FRONT_LEFT</code>,
8 <code class="constant">GL_FRONT_RIGHT</code>,
9 <code class="constant">GL_BACK_LEFT</code>,
10 <code class="constant">GL_BACK_RIGHT</code>,
11 <code class="constant">GL_FRONT</code>,
12 <code class="constant">GL_BACK</code>,
13 <code class="constant">GL_LEFT</code>,
14 <code class="constant">GL_RIGHT</code>,
15 <code class="constant">GL_FRONT_AND_BACK</code>, and
16 <code class="constant">GL_AUX</code><span class="emphasis"><em>i</em></span>,
17 where <span class="emphasis"><em>i</em></span> is between 0 and the value of <code class="constant">GL_AUX_BUFFERS</code> minus 1,
18 are accepted. (<code class="constant">GL_AUX_BUFFERS</code> is not the upper limit; use <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
19 to query the number of available aux buffers.)
20 The initial value is <code class="constant">GL_FRONT</code> for single-buffered contexts,
21 and <code class="constant">GL_BACK</code> for double-buffered contexts.
22 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
23 When colors are written to the frame buffer,
24 they are written into the color buffers specified by <code class="function">glDrawBuffer</code>.
25 The specifications are as follows:
26 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_NONE</code></span></dt><dd><p>
27 No color buffers are written.
28 </p></dd><dt><span class="term"><code class="constant">GL_FRONT_LEFT</code></span></dt><dd><p>
29 Only the front left color buffer is written.
30 </p></dd><dt><span class="term"><code class="constant">GL_FRONT_RIGHT</code></span></dt><dd><p>
31 Only the front right color buffer is written.
32 </p></dd><dt><span class="term"><code class="constant">GL_BACK_LEFT</code></span></dt><dd><p>
33 Only the back left color buffer is written.
34 </p></dd><dt><span class="term"><code class="constant">GL_BACK_RIGHT</code></span></dt><dd><p>
35 Only the back right color buffer is written.
36 </p></dd><dt><span class="term"><code class="constant">GL_FRONT</code></span></dt><dd><p>
37 Only the front left and front right color buffers are written.
38 If there is no front right color buffer,
39 only the front left color buffer is written.
40 </p></dd><dt><span class="term"><code class="constant">GL_BACK</code></span></dt><dd><p>
41 Only the back left and back right color buffers are written.
42 If there is no back right color buffer,
43 only the back left color buffer is written.
44 </p></dd><dt><span class="term"><code class="constant">GL_LEFT</code></span></dt><dd><p>
45 Only the front left and back left color buffers are written.
46 If there is no back left color buffer,
47 only the front left color buffer is written.
48 </p></dd><dt><span class="term"><code class="constant">GL_RIGHT</code></span></dt><dd><p>
49 Only the front right and back right color buffers are written.
50 If there is no back right color buffer,
51 only the front right color buffer is written.
52 </p></dd><dt><span class="term"><code class="constant">GL_FRONT_AND_BACK</code></span></dt><dd><p>
53 All the front and back color buffers
54 (front left, front right, back left, back right)
55 are written.
56 If there are no back color buffers,
57 only the front left and front right color buffers are written.
58 If there are no right color buffers,
59 only the front left and back left color buffers are written.
60 If there are no right or back color buffers,
61 only the front left color buffer is written.
62 </p></dd><dt><span class="term"><code class="constant">GL_AUX</code><span class="emphasis"><em>i</em></span></span></dt><dd><p>
63 Only auxiliary color buffer <span class="emphasis"><em>i</em></span> is written.
64 </p></dd></dl></div><p>
65 If more than one color buffer is selected for drawing,
66 then blending or logical operations are computed and applied independently
67 for each color buffer and can produce different results in each buffer.
68 </p><p>
69 Monoscopic contexts include only
70 <span class="emphasis"><em>left</em></span>
71 buffers, and stereoscopic contexts include both
72 <span class="emphasis"><em>left</em></span>
73 and
74 <span class="emphasis"><em>right</em></span>
75 buffers.
76 Likewise, single-buffered contexts include only
77 <span class="emphasis"><em>front</em></span>
78 buffers, and double-buffered contexts include both
79 <span class="emphasis"><em>front</em></span>
80 and
81 <span class="emphasis"><em>back</em></span>
82 buffers.
83 The context is selected at GL initialization.
84 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
85 It is always the case that <code class="constant">GL_AUX</code>
86 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>
87 = <code class="constant">GL_AUX0</code> +
88 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>.
89 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
90 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>mode</code></em> is not an accepted value.
91 </p><p>
92 <code class="constant">GL_INVALID_OPERATION</code> is generated if none of the buffers indicated
93 by <em class="parameter"><code>mode</code></em> exists.
94 </p><p>
95 <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glDrawBuffer</code>
96 is executed between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>
97 and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
98 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
99 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_DRAW_BUFFER</code>
100 </p><p>
101 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_AUX_BUFFERS</code>
102 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
103 <a class="citerefentry" href="glBlendFunc.xml"><span class="citerefentry"><span class="refentrytitle">glBlendFunc</span></span></a>,
104 <a class="citerefentry" href="glColorMask.xml"><span class="citerefentry"><span class="refentrytitle">glColorMask</span></span></a>,
105 <a class="citerefentry" href="glIndexMask.xml"><span class="citerefentry"><span class="refentrytitle">glIndexMask</span></span></a>,
106 <a class="citerefentry" href="glLogicOp.xml"><span class="citerefentry"><span class="refentrytitle">glLogicOp</span></span></a>,
107 <a class="citerefentry" href="glReadBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glReadBuffer</span></span></a>
108 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
109 Copyright <span class="trademark"></span>© 1991-2006
110 Silicon Graphics, Inc. This document is licensed under the SGI
111 Free Software B License. For details, see
112 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
113 </p></div></div></body></html>