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