'\" t .\" Title: glDrawBuffer .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLDRAWBUFFER" "3G" "01/03/2018" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glDrawBuffer, glNamedFramebufferDrawBuffer \- specify which color buffers are to be drawn into .SH "C SPECIFICATION" .HP \w'void\ glDrawBuffer('u .BI "void glDrawBuffer(GLenum\ " "buf" ");" .HP \w'void\ glNamedFramebufferDrawBuffer('u .BI "void glNamedFramebufferDrawBuffer(GLuint\ " "framebuffer" ", GLenum\ " "buf" ");" .SH "PARAMETERS" .PP \fIframebuffer\fR .RS 4 Specifies the name of the framebuffer object for \fBglNamedFramebufferDrawBuffer\fR function\&. Must be zero or the name of a framebuffer object\&. .RE .PP \fIbuf\fR .RS 4 For default framebuffer, the argument specifies up to four color buffers to be drawn into\&. Symbolic constants \fBGL_NONE\fR, \fBGL_FRONT_LEFT\fR, \fBGL_FRONT_RIGHT\fR, \fBGL_BACK_LEFT\fR, \fBGL_BACK_RIGHT\fR, \fBGL_FRONT\fR, \fBGL_BACK\fR, \fBGL_LEFT\fR, \fBGL_RIGHT\fR, and \fBGL_FRONT_AND_BACK\fR are accepted\&. The initial value is \fBGL_FRONT\fR for single\-buffered contexts, and \fBGL_BACK\fR for double\-buffered contexts\&. For framebuffer objects, \fBGL_COLOR_ATTACHMENT$m$\fR and \fBGL_NONE\fR enums are accepted, where \fB$m$\fR is a value between 0 and \fBGL_MAX_COLOR_ATTACHMENTS\fR\&. .RE .SH "DESCRIPTION" .PP When colors are written to the frame buffer, they are written into the color buffers specified by \fBglDrawBuffer\fR\&. One of the following values can be used for default framebuffer: .PP \fBGL_NONE\fR .RS 4 No color buffers are written\&. .RE .PP \fBGL_FRONT_LEFT\fR .RS 4 Only the front left color buffer is written\&. .RE .PP \fBGL_FRONT_RIGHT\fR .RS 4 Only the front right color buffer is written\&. .RE .PP \fBGL_BACK_LEFT\fR .RS 4 Only the back left color buffer is written\&. .RE .PP \fBGL_BACK_RIGHT\fR .RS 4 Only the back right color buffer is written\&. .RE .PP \fBGL_FRONT\fR .RS 4 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\&. .RE .PP \fBGL_BACK\fR .RS 4 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\&. .RE .PP \fBGL_LEFT\fR .RS 4 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\&. .RE .PP \fBGL_RIGHT\fR .RS 4 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\&. .RE .PP \fBGL_FRONT_AND_BACK\fR .RS 4 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\&. .RE .PP 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\&. .PP Monoscopic contexts include only \fIleft\fR buffers, and stereoscopic contexts include both \fIleft\fR and \fIright\fR buffers\&. Likewise, single\-buffered contexts include only \fIfront\fR buffers, and double\-buffered contexts include both \fIfront\fR and \fIback\fR buffers\&. The context is selected at GL initialization\&. .PP For framebuffer objects, \fBGL_COLOR_ATTACHMENT$m$\fR and \fBGL_NONE\fR enums are accepted, where \fB$m$\fR is a value between 0 and \fBGL_MAX_COLOR_ATTACHMENTS\fR\&. glDrawBuffer will set the draw buffer for fragment colors other than zero to \fBGL_NONE\fR\&. .SH "ERRORS" .PP \fBGL_INVALID_OPERATION\fR error is generated by \fBglNamedFramebufferDrawBuffer\fR if \fIframebuffer\fR is not zero or the name of an existing framebuffer object\&. .PP \fBGL_INVALID_ENUM\fR is generated if \fIbuf\fR is not an accepted value\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the default framebuffer is affected and none of the buffers indicated by \fIbuf\fR exists\&. .PP \fBGL_INVALID_OPERATION\fR is generated if a framebuffer object is affected and \fIbuf\fR is not equal to \fBGL_NONE\fR or \fBGL_COLOR_ATTACHMENT$m$\fR, where \fB$m$\fR is a value between 0 and \fBGL_MAX_COLOR_ATTACHMENTS\fR\&. .SH "ASSOCIATED GETS" .PP \fBglGet\fR() with argument \fBGL_DRAW_BUFFER\fR .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .T& l c c c c c c c c c c c c l c c c c c c c c c c c c. T{ \fBglDrawBuffer\fR T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ \fBglNamedFramebufferDrawBuffer\fR T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ ✔ T} .TE .sp 1 .SH "SEE ALSO" .PP \fBglBlendFunc\fR(), \fBglColorMask\fR(), \fBglDrawBuffers\fR(), \fBglLogicOp\fR(), \fBglReadBuffer\fR() .SH "COPYRIGHT" .PP Copyright \(co 1991\-2006 Silicon Graphics, Inc\&. Copyright \(co 2010\-2014 Khronos Group\&. This document is licensed under the SGI Free Software B License\&. For details, see \m[blue]\fBhttp://oss\&.sgi\&.com/projects/FreeB/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 1991-2006 Silicon Graphics, Inc. .br Copyright \(co 2010-2014 Khronos Group .br