Opentk/Source/Bind/Specifications/Docs/glDrawBuffer.xml
Stefanos A 60f971ffed Updated to the latest gl4 specs and docs
Large code-drop from Khronos upstream.
2013-11-03 12:43:50 +01:00

212 lines
8.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry id="glDrawBuffer">
<refentryinfo>
<copyright>
<year>1991-2006</year>
<holder>Silicon Graphics, Inc.</holder>
</copyright>
</refentryinfo>
<refmeta>
<refentrytitle>glDrawBuffer</refentrytitle>
<manvolnum>3G</manvolnum>
</refmeta>
<refnamediv>
<refname>glDrawBuffer</refname>
<refpurpose>specify which color buffers are to be drawn into</refpurpose>
</refnamediv>
<refsynopsisdiv><title>C Specification</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glDrawBuffer</function></funcdef>
<paramdef>GLenum <parameter>mode</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 id="parameters"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><parameter>mode</parameter></term>
<listitem>
<para>
Specifies up to four color buffers to be drawn into.
Symbolic constants
<constant>GL_NONE</constant>,
<constant>GL_FRONT_LEFT</constant>,
<constant>GL_FRONT_RIGHT</constant>,
<constant>GL_BACK_LEFT</constant>,
<constant>GL_BACK_RIGHT</constant>,
<constant>GL_FRONT</constant>,
<constant>GL_BACK</constant>,
<constant>GL_LEFT</constant>,
<constant>GL_RIGHT</constant>, and
<constant>GL_FRONT_AND_BACK</constant>
are accepted.
The initial value is <constant>GL_FRONT</constant> for single-buffered contexts,
and <constant>GL_BACK</constant> for double-buffered contexts.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="description"><title>Description</title>
<para>
When colors are written to the frame buffer,
they are written into the color buffers specified by <function>glDrawBuffer</function>.
The specifications are as follows:
</para>
<variablelist>
<varlistentry>
<term><constant>GL_NONE</constant></term>
<listitem>
<para>
No color buffers are written.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_FRONT_LEFT</constant></term>
<listitem>
<para>
Only the front left color buffer is written.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_FRONT_RIGHT</constant></term>
<listitem>
<para>
Only the front right color buffer is written.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_BACK_LEFT</constant></term>
<listitem>
<para>
Only the back left color buffer is written.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_BACK_RIGHT</constant></term>
<listitem>
<para>
Only the back right color buffer is written.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_FRONT</constant></term>
<listitem>
<para>
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.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_BACK</constant></term>
<listitem>
<para>
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.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_LEFT</constant></term>
<listitem>
<para>
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.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_RIGHT</constant></term>
<listitem>
<para>
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.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_FRONT_AND_BACK</constant></term>
<listitem>
<para>
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.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
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.
</para>
<para>
Monoscopic contexts include only
<emphasis>left</emphasis>
buffers, and stereoscopic contexts include both
<emphasis>left</emphasis>
and
<emphasis>right</emphasis>
buffers.
Likewise, single-buffered contexts include only
<emphasis>front</emphasis>
buffers, and double-buffered contexts include both
<emphasis>front</emphasis>
and
<emphasis>back</emphasis>
buffers.
The context is selected at GL initialization.
</para>
</refsect1>
<refsect1 id="errors"><title>Errors</title>
<para>
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if none of the buffers indicated
by <parameter>mode</parameter> exists.
</para>
</refsect1>
<refsect1 id="associatedgets"><title>Associated Gets</title>
<para>
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_DRAW_BUFFER</constant>
</para>
</refsect1>
<refsect1 id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glColorMask</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawBuffers</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glReadBuffer</refentrytitle></citerefentry>
</para>
</refsect1>
<refsect1 id="Copyright"><title>Copyright</title>
<para>
Copyright <trademark class="copyright"></trademark> 1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
<ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
</para>
</refsect1>
</refentry>