| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" |
| 3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> |
| 4 | <refentry id="glReadBuffer"> |
| 5 | <refmeta> |
| 6 | <refmetainfo> |
| 7 | <copyright> |
| 8 | <year>1991-2006</year> |
| 9 | <holder>Silicon Graphics, Inc.</holder> |
| 10 | </copyright> |
| 11 | </refmetainfo> |
| 12 | <refentrytitle>glReadBuffer</refentrytitle> |
| 13 | <manvolnum>3G</manvolnum> |
| 14 | </refmeta> |
| 15 | <refnamediv> |
| 16 | <refname>glReadBuffer</refname> |
| 17 | <refpurpose>select a color buffer source for pixels</refpurpose> |
| 18 | </refnamediv> |
| 19 | <refsynopsisdiv><title>C Specification</title> |
| 20 | <funcsynopsis> |
| 21 | <funcprototype> |
| 22 | <funcdef>void <function>glReadBuffer</function></funcdef> |
| 23 | <paramdef>GLenum <parameter>mode</parameter></paramdef> |
| 24 | </funcprototype> |
| 25 | </funcsynopsis> |
| 26 | </refsynopsisdiv> |
| 27 | <refsect1 id="parameters"><title>Parameters</title> |
| 28 | <variablelist> |
| 29 | <varlistentry> |
| 30 | <term><parameter>mode</parameter></term> |
| 31 | <listitem> |
| 32 | <para> |
| 33 | Specifies a color buffer. |
| 34 | Accepted values are |
| 35 | <constant>GL_FRONT_LEFT</constant>, |
| 36 | <constant>GL_FRONT_RIGHT</constant>, |
| 37 | <constant>GL_BACK_LEFT</constant>, |
| 38 | <constant>GL_BACK_RIGHT</constant>, |
| 39 | <constant>GL_FRONT</constant>, |
| 40 | <constant>GL_BACK</constant>, |
| 41 | <constant>GL_LEFT</constant>, |
| 42 | <constant>GL_RIGHT</constant>, and |
| 43 | <constant>GL_AUX</constant><emphasis>i</emphasis>, |
| 44 | where <emphasis>i</emphasis> is between 0 and the value of <constant>GL_AUX_BUFFERS</constant> minus 1. |
| 45 | </para> |
| 46 | </listitem> |
| 47 | </varlistentry> |
| 48 | </variablelist> |
| 49 | </refsect1> |
| 50 | <refsect1 id="description"><title>Description</title> |
| 51 | <para> |
| 52 | <function>glReadBuffer</function> specifies a color buffer as the source for subsequent |
| 53 | <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>, |
| 54 | <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>, |
| 55 | <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>, and |
| 56 | <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry> commands. |
| 57 | <parameter>mode</parameter> accepts one of twelve or more predefined values. |
| 58 | (<constant>GL_AUX0</constant> through <constant>GL_AUX3</constant> are always defined.) |
| 59 | In a fully configured system, |
| 60 | <constant>GL_FRONT</constant>, |
| 61 | <constant>GL_LEFT</constant>, and |
| 62 | <constant>GL_FRONT_LEFT</constant> all name the front left buffer, |
| 63 | <constant>GL_FRONT_RIGHT</constant> and |
| 64 | <constant>GL_RIGHT</constant> name the front right buffer, and |
| 65 | <constant>GL_BACK_LEFT</constant> and |
| 66 | <constant>GL_BACK</constant> name the back left buffer. |
| 67 | </para> |
| 68 | <para> |
| 69 | Nonstereo double-buffered configurations have only a front left and a |
| 70 | back left buffer. |
| 71 | Single-buffered configurations have a front left and a front right |
| 72 | buffer if stereo, and only a front left buffer if nonstereo. |
| 73 | It is an error to specify a nonexistent buffer to <function>glReadBuffer</function>. |
| 74 | </para> |
| 75 | <para> |
| 76 | <parameter>mode</parameter> is initially <constant>GL_FRONT</constant> in single-buffered configurations |
| 77 | and <constant>GL_BACK</constant> in double-buffered configurations. |
| 78 | </para> |
| 79 | </refsect1> |
| 80 | <refsect1 id="errors"><title>Errors</title> |
| 81 | <para> |
| 82 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not one of the twelve |
| 83 | (or more) accepted values. |
| 84 | </para> |
| 85 | <para> |
| 86 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>mode</parameter> specifies a buffer |
| 87 | that does not exist. |
| 88 | </para> |
| 89 | <para> |
| 90 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glReadBuffer</function> |
| 91 | is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> |
| 92 | and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. |
| 93 | </para> |
| 94 | </refsect1> |
| 95 | <refsect1 id="associatedgets"><title>Associated Gets</title> |
| 96 | <para> |
| 97 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_READ_BUFFER</constant> |
| 98 | </para> |
| 99 | </refsect1> |
| 100 | <refsect1 id="seealso"><title>See Also</title> |
| 101 | <para> |
| 102 | <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>, |
| 103 | <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>, |
| 104 | <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>, |
| 105 | <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>, |
| 106 | <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>, |
| 107 | <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>, |
| 108 | <citerefentry><refentrytitle>glDrawBuffer</refentrytitle></citerefentry>, |
| 109 | <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry> |
| 110 | </para> |
| 111 | </refsect1> |
| 112 | <refsect1 id="Copyright"><title>Copyright</title> |
| 113 | <para> |
| 114 | Copyright <trademark class="copyright"></trademark> 1991-2006 |
| 115 | Silicon Graphics, Inc. This document is licensed under the SGI |
| 116 | Free Software B License. For details, see |
| 117 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. |
| 118 | </para> |
| 119 | </refsect1> |
| 120 | </refentry> |