forked from BSVino/docs.gl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
glDrawBuffer.xhtml
97 lines (97 loc) · 7.7 KB
/
glDrawBuffer.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<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"><p><code class="funcdef">void <b class="fsfunc">glDrawBuffer</b>(</code>GLenum <var class="pdparam">mode</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>mode</code></em></span></dt><dd><p>
Specifies up to four color buffers to be drawn into.
Symbolic constants
<code class="constant">GL_NONE</code>,
<code class="constant">GL_FRONT_LEFT</code>,
<code class="constant">GL_FRONT_RIGHT</code>,
<code class="constant">GL_BACK_LEFT</code>,
<code class="constant">GL_BACK_RIGHT</code>,
<code class="constant">GL_FRONT</code>,
<code class="constant">GL_BACK</code>,
<code class="constant">GL_LEFT</code>,
<code class="constant">GL_RIGHT</code>, and
<code class="constant">GL_FRONT_AND_BACK</code>
are accepted.
The initial value is <code class="constant">GL_FRONT</code> for single-buffered contexts,
and <code class="constant">GL_BACK</code> for double-buffered contexts.
</p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
When colors are written to the frame buffer,
they are written into the color buffers specified by <code class="function">glDrawBuffer</code>.
The specifications are as follows:
</p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_NONE</code></span></dt><dd><p>
No color buffers are written.
</p></dd><dt><span class="term"><code class="constant">GL_FRONT_LEFT</code></span></dt><dd><p>
Only the front left color buffer is written.
</p></dd><dt><span class="term"><code class="constant">GL_FRONT_RIGHT</code></span></dt><dd><p>
Only the front right color buffer is written.
</p></dd><dt><span class="term"><code class="constant">GL_BACK_LEFT</code></span></dt><dd><p>
Only the back left color buffer is written.
</p></dd><dt><span class="term"><code class="constant">GL_BACK_RIGHT</code></span></dt><dd><p>
Only the back right color buffer is written.
</p></dd><dt><span class="term"><code class="constant">GL_FRONT</code></span></dt><dd><p>
Only the front left and front right color buffers are written.
If there is no front right color buffer,
only the front left color buffer is written.
</p></dd><dt><span class="term"><code class="constant">GL_BACK</code></span></dt><dd><p>
Only the back left and back right color buffers are written.
If there is no back right color buffer,
only the back left color buffer is written.
</p></dd><dt><span class="term"><code class="constant">GL_LEFT</code></span></dt><dd><p>
Only the front left and back left color buffers are written.
If there is no back left color buffer,
only the front left color buffer is written.
</p></dd><dt><span class="term"><code class="constant">GL_RIGHT</code></span></dt><dd><p>
Only the front right and back right color buffers are written.
If there is no back right color buffer,
only the front right color buffer is written.
</p></dd><dt><span class="term"><code class="constant">GL_FRONT_AND_BACK</code></span></dt><dd><p>
All the front and back color buffers
(front left, front right, back left, back right)
are written.
If there are no back color buffers,
only the front left and front right color buffers are written.
If there are no right color buffers,
only the front left and back left color buffers are written.
If there are no right or back color buffers,
only the front left color buffer is written.
</p></dd></dl></div><p>
If more than one color buffer is selected for drawing,
then blending or logical operations are computed and applied independently
for each color buffer and can produce different results in each buffer.
</p><p>
Monoscopic contexts include only
<span class="emphasis"><em>left</em></span>
buffers, and stereoscopic contexts include both
<span class="emphasis"><em>left</em></span>
and
<span class="emphasis"><em>right</em></span>
buffers.
Likewise, single-buffered contexts include only
<span class="emphasis"><em>front</em></span>
buffers, and double-buffered contexts include both
<span class="emphasis"><em>front</em></span>
and
<span class="emphasis"><em>back</em></span>
buffers.
The context is selected at GL initialization.
</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
<code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>mode</code></em> is not an accepted value.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if none of the buffers indicated
by <em class="parameter"><code>mode</code></em> exists.
</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
<a href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_DRAW_BUFFER</code>
</p></div>
{$pipelinestall}{$examples}
<div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
<a href="glBlendFunc"><span class="citerefentry"><span class="refentrytitle">glBlendFunc</span></span></a>,
<a href="glColorMask"><span class="citerefentry"><span class="refentrytitle">glColorMask</span></span></a>,
<a href="glDrawBuffers"><span class="citerefentry"><span class="refentrytitle">glDrawBuffers</span></span></a>,
<a href="glLogicOp"><span class="citerefentry"><span class="refentrytitle">glLogicOp</span></span></a>,
<a href="glReadBuffer"><span class="citerefentry"><span class="refentrytitle">glReadBuffer</span></span></a>
</p></div><div class="refsect1" lang="en" xml:lang="en"><div id="Copyright"><h2>Copyright</h2><p>
Copyright © 1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
<a href="https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/" target="_top">https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/</a>.
</p></div></div></div>