glDrawBuffer.3   [plain text]


'\" te  
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp May 22 14:45
.ds Dm 5 May 22 14:
.ds Xs 38775     6
.TH GLDRAWBUFFER 3G
.SH NAME
.B "glDrawBuffer
\- specify which color buffers are to be drawn into

.SH C SPECIFICATION
void \f3glDrawBuffer\fP(
GLenum \fImode\fP )
.nf
.fi

.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\f2mode\fP\ \ 'u 
\f2mode\fP
Specifies up to four color buffers to be drawn into.
Symbolic constants
\%\f3GL_NONE\fP, 
\%\f3GL_FRONT_LEFT\fP,
\%\f3GL_FRONT_RIGHT\fP,
\%\f3GL_BACK_LEFT\fP,
\%\f3GL_BACK_RIGHT\fP,
\%\f3GL_FRONT\fP,
\%\f3GL_BACK\fP,
\%\f3GL_LEFT\fP,
\%\f3GL_RIGHT\fP,
\%\f3GL_FRONT_AND_BACK\fP, and
\%\f3GL_AUX\fP\f2i\fP,
where \f2i\fP is between 0 and
.br
``\%\f3GL_AUX_BUFFERS\fP'' \-1,
are accepted (\%\f3GL_AUX_BUFFERS\fP is not the upper limit; use \%\f3glGet\fP
to query the number of available aux buffers.)
The initial value is \%\f3GL_FRONT\fP for single-buffered contexts,
and \%\f3GL_BACK\fP for double-buffered contexts.
.SH DESCRIPTION
When colors are written to the frame buffer,
they are written into the color buffers specified by \%\f3glDrawBuffer\fP.
The specifications are as follows:
.TP 25
\%\f3GL_NONE\fP
No color buffers are written.
.TP
\%\f3GL_FRONT_LEFT\fP
Only the front left color buffer is written.
.TP
\%\f3GL_FRONT_RIGHT\fP
Only the front right color buffer is written.
.TP
\%\f3GL_BACK_LEFT\fP
Only the back left color buffer is written.
.TP
\%\f3GL_BACK_RIGHT\fP
Only the back right color buffer is written.
.TP
\%\f3GL_FRONT\fP
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.
.TP
\%\f3GL_BACK\fP
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.
.TP
\%\f3GL_LEFT\fP
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.
.TP
\%\f3GL_RIGHT\fP
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.
.BP
.TP
\%\f3GL_FRONT_AND_BACK\fP
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.
.TP
\%\f3GL_AUX\fP\f2i\fP
Only auxiliary color buffer \f2i\fP is written.
.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
Monoscopic contexts include only 
.I left 
buffers, and stereoscopic contexts include both
.I left
and
.I right
buffers.
Likewise, single-buffered contexts include only
.I front
buffers, and double-buffered contexts include both 
.I front
and
.I back
buffers.
The context is selected at GL initialization.
.SH NOTES
It is always the case that \%\f3GL_AUX\fP$i$ = \%\f3GL_AUX0\fP + $i$.
.SH ERRORS
\%\f3GL_INVALID_ENUM\fP is generated if \f2mode\fP is not an accepted value.
.P
\%\f3GL_INVALID_OPERATION\fP is generated if none of the buffers indicated
by \f2mode\fP exists.
.P
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glDrawBuffer\fP
is executed between the execution of \%\f3glBegin\fP
and the corresponding execution of \%\f3glEnd\fP.
.SH ASSOCIATED GETS
\%\f3glGet\fP with argument \%\f3GL_DRAW_BUFFER\fP
.br
\%\f3glGet\fP with argument \%\f3GL_AUX_BUFFERS\fP
.SH SEE ALSO
\%\f3glBlendFunc\fP,
\%\f3glColorMask\fP,
\%\f3glIndexMask\fP,
\%\f3glLogicOp\fP,
\%\f3glReadBuffer\fP