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">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glReadBuffer
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glReadBuffer
</refname>
17 <refpurpose>select a color buffer source for pixels
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glReadBuffer
</function></funcdef>
23 <paramdef>GLenum
<parameter>mode
</parameter></paramdef>
27 <refsect1 id=
"parameters"><title>Parameters
</title>
30 <term><parameter>mode
</parameter></term>
33 Specifies a color buffer.
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 the constants
43 <constant>GL_COLOR_ATTACHMENT
<emphasis>i
</emphasis></constant>.
49 <refsect1 id=
"description"><title>Description
</title>
51 <function>glReadBuffer
</function> specifies a color buffer as the source for subsequent
52 <citerefentry><refentrytitle>glReadPixels
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glCopyTexImage1D
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glCopyTexImage2D
</refentrytitle></citerefentry>,
53 <citerefentry><refentrytitle>glCopyTexSubImage1D
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glCopyTexSubImage2D
</refentrytitle></citerefentry>, and
54 <citerefentry><refentrytitle>glCopyTexSubImage3D
</refentrytitle></citerefentry> commands.
55 <parameter>mode
</parameter> accepts one of twelve or more predefined values.
56 In a fully configured system,
57 <constant>GL_FRONT
</constant>,
58 <constant>GL_LEFT
</constant>, and
59 <constant>GL_FRONT_LEFT
</constant> all name the front left buffer,
60 <constant>GL_FRONT_RIGHT
</constant> and
61 <constant>GL_RIGHT
</constant> name the front right buffer, and
62 <constant>GL_BACK_LEFT
</constant> and
63 <constant>GL_BACK
</constant> name the back left buffer.
64 Further more, the constants
<constant>GL_COLOR_ATTACHMENT
<emphasis>i
</emphasis></constant> may be used to indicate the
65 <emphasis>i
</emphasis><superscript>th
</superscript> color attachment where
<emphasis>i
</emphasis> ranges from zero to the
66 value of
<constant>GL_MAX_COLOR_ATTACHMENTS
</constant> minus one.
69 Nonstereo double-buffered configurations have only a front left and a
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>.
76 <parameter>mode
</parameter> is initially
<constant>GL_FRONT
</constant> in single-buffered configurations
77 and
<constant>GL_BACK
</constant> in double-buffered configurations.
80 <refsect1 id=
"errors"><title>Errors
</title>
82 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>mode
</parameter> is not one of the twelve
83 (or more) accepted values.
86 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>mode
</parameter> specifies a buffer
90 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
92 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_READ_BUFFER
</constant>
95 <refsect1 id=
"seealso"><title>See Also
</title>
97 <citerefentry><refentrytitle>glCopyTexImage1D
</refentrytitle></citerefentry>,
98 <citerefentry><refentrytitle>glCopyTexImage2D
</refentrytitle></citerefentry>,
99 <citerefentry><refentrytitle>glCopyTexSubImage1D
</refentrytitle></citerefentry>,
100 <citerefentry><refentrytitle>glCopyTexSubImage2D
</refentrytitle></citerefentry>,
101 <citerefentry><refentrytitle>glCopyTexSubImage3D
</refentrytitle></citerefentry>,
102 <citerefentry><refentrytitle>glDrawBuffer
</refentrytitle></citerefentry>,
103 <citerefentry><refentrytitle>glReadPixels
</refentrytitle></citerefentry>
106 <refsect1 id=
"Copyright"><title>Copyright
</title>
108 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006 Silicon Graphics, Inc.
109 Copyright
<trademark class=
"copyright"></trademark> 2011 Khronos Group.
110 This document is licensed under the SGI
111 Free Software B License. For details, see
112 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.