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
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>glDrawBuffer</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GL.xml" title="GL"/><link rel="previous" href="glDrawArrays.3G.xml" title="glDrawArrays"/><link rel="next" href="glDrawElements.3G.xml" title="glDrawElements"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glDrawBuffer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glDrawArrays.3G.xml">Prev</a></td><th width="60%" align="center">GL</th><td width="20%" align="right"><a accesskey="n" href="glDrawElements.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glDrawBuffer.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glDrawBuffer.3G-name"/><h2>Name</h2><p>glDrawBuffer — specify which color buffers are to be drawn into</p></div><div class="refsynopsisdiv"><a name="glDrawBuffer.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void<tt>glDrawBuffer</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum<i><tt>mode</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glDrawBuffer.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glDrawBuffer</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>mode</tt></i>) →<tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glDrawBuffer.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>mode</tt></i></span></dt><dd>
Specifies up to four color buffers to be drawn into. Symbolic constants <tt>GL_NONE</tt>,
<tt>GL_FRONT_LEFT</tt>, <tt>GL_FRONT_RIGHT</tt>, <tt>GL_BACK_LEFT</tt>,
<tt>GL_BACK_RIGHT</tt>, <tt>GL_FRONT</tt>, <tt>GL_BACK</tt>,
<tt>GL_LEFT</tt>, <tt>GL_RIGHT</tt>, <tt>GL_FRONT_AND_BACK</tt>, and
<tt>GL_AUX</tt><i><tt>i</tt></i>, where <i><tt>i</tt></i> is between 0 and
</dd></dl></div><p>
``<tt>GL_AUX_BUFFERS</tt>'' -1, are accepted (<tt>GL_AUX_BUFFERS</tt> is not the upper limit;
use <tt>glGet</tt> to query the number of available aux buffers.) The initial value is
<tt>GL_FRONT</tt> for single-buffered contexts, and <tt>GL_BACK</tt> for double-buffered
contexts.
</p></div><div class="refsect1" lang="en"><a name="glDrawBuffer.3G-description"/><h2>Description</h2><p>
When colors are written to the frame buffer, they are written into the color buffers specified by
<tt>glDrawBuffer</tt>. The specifications are as follows:
</p><div class="variablelist"><dl><dt><span class="term"><tt>GL_NONE</tt></span></dt><dd>
No color buffers are written.
</dd><dt><span class="term"><tt>GL_FRONT_LEFT</tt></span></dt><dd>
Only the front left color buffer is written.
</dd><dt><span class="term"><tt>GL_FRONT_RIGHT</tt></span></dt><dd>
Only the front right color buffer is written.
</dd><dt><span class="term"><tt>GL_BACK_LEFT</tt></span></dt><dd>
Only the back left color buffer is written.
</dd><dt><span class="term"><tt>GL_BACK_RIGHT</tt></span></dt><dd>
Only the back right color buffer is written.
</dd><dt><span class="term"><tt>GL_FRONT</tt></span></dt><dd>
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.
</dd><dt><span class="term"><tt>GL_BACK</tt></span></dt><dd>
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.
</dd><dt><span class="term"><tt>GL_LEFT</tt></span></dt><dd>
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.
</dd><dt><span class="term"><tt>GL_RIGHT</tt></span></dt><dd>
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.
</dd><dt><span class="term"><tt>GL_FRONT_AND_BACK</tt></span></dt><dd>
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.
</dd><dt><span class="term"><tt>GL_AUX</tt><i><tt>i</tt></i></span></dt><dd>
Only auxiliary color buffer <i><tt>i</tt></i> is written.
</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"><a name="glDrawBuffer.3G-notes"/><h2>Notes</h2><p>
It is always the case that <tt>GL_AUX</tt><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mi>i</mml:mi>
</mml:math> = <tt>GL_AUX0</tt> + <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mi>i</mml:mi>
</mml:math>.
</p></div><div class="refsect1" lang="en"><a name="glDrawBuffer.3G-errors"/><h2>Errors</h2><p>
<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>mode</tt></i> is not an accepted value.
</p><p>
<tt>GL_INVALID_OPERATION</tt> is generated if none of the buffers indicated by <i><tt>mode</tt></i>
exists.
</p><p>
<tt>GL_INVALID_OPERATION</tt> is generated if <tt>glDrawBuffer</tt> is executed between the
execution of <a href="glBegin.3G.xml"><tt>glBegin</tt></a> and the corresponding execution of <a href="glBegin.3G.xml"><tt>glEnd</tt></a>.
</p></div><div class="refsect1" lang="en"><a name="glDrawBuffer.3G-associated_gets"/><h2>Associated Gets</h2><p>
<tt>glGet</tt> with argument <tt>GL_DRAW_BUFFER</tt>
</p><p>
<tt>glGet</tt> with argument <tt>GL_AUX_BUFFERS</tt>
</p></div><div class="refsect1" lang="en"><a name="glDrawBuffer.3G-see_also"/><h2>See Also</h2><p>
<span class="simplelist"><a href="glBlendFunc.3G.xml">glBlendFunc</a>, <a href="glColorMask.3G.xml">glColorMask</a>, <a href="glIndexMask.3G.xml">glIndexMask</a>, <a href="glLogicOp.3G.xml">glLogicOp</a>, <a href="glReadBuffer.3G.xml">glReadBuffer</a></span>
</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glDrawArrays.3G.xml">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="reference-GL.xml">Up</a></td><td width="40%" align="right"><a accesskey="n" href="glDrawElements.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glDrawArrays</td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top">glDrawElements</td></tr></table></div></body></html>
|