Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gldrawbuffers(3g) [debian man page]

GLDRAWBUFFERS(3G)						  [FIXME: manual]						 GLDRAWBUFFERS(3G)

NAME
glDrawBuffers - Specifies a list of color buffers to be drawn into C SPECIFICATION
void glDrawBuffers(GLsizei n, const GLenum *bufs); PARAMETERS
n Specifies the number of buffers in bufs. bufs Points to an array of symbolic constants specifying the buffers into which fragment colors or data values will be written. DESCRIPTION
glDrawBuffers defines an array of buffers into which outputs from the fragment shader data will be written. If a fragment shader writes a value to one or more user defined output variables, then the value of each variable will be written into the buffer specified at a location within bufs corresponding to the location assigned to that user defined output. The draw buffer used for user defined outputs assigned to locations greater than or equal to n is implicitly set to GL_NONE and any data written to such an output is discarded. The symbolic constants contained in bufs may be any of the following: GL_NONE The fragment shader output value is not written into any color buffer. GL_FRONT_LEFT The fragment shader output value is written into the front left color buffer. GL_FRONT_RIGHT The fragment shader output value is written into the front right color buffer. GL_BACK_LEFT The fragment shader output value is written into the back left color buffer. GL_BACK_RIGHT The fragment shader output value is written into the back right color buffer. GL_COLOR_ATTACHMENTn The fragment shader output value is written into the nth color attachment of the current framebuffer. n may range from 0 to the value of GL_MAX_COLOR_ATTACHMENTS. Except for GL_NONE, the preceding symbolic constants may not appear more than once in bufs. The maximum number of draw buffers supported is implementation dependent and can be queried by calling glGet() with the argument GL_MAX_DRAW_BUFFERS. NOTES
The symbolic constants GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, and GL_FRONT_AND_BACK are not allowed in the bufs array since they may refer to multiple buffers. If a fragment shader does not write to a user defined output variable, the values of the fragment colors following shader execution are undefined. For each fragment generated in this situation, a different value may be written into each of the buffers specified by bufs. ERRORS
GL_INVALID_ENUM is generated if one of the values in bufs is not an accepted value. GL_INVALID_ENUM is generated if the GL is bound to the default framebuffer and one or more of the values in bufs is one of the GL_COLOR_ATTACHMENTn tokens. GL_INVALID_ENUM is generated if the GL is bound to a framebuffer object and one or more of the values in bufs is anything other than GL_NONE or one of the GL_COLOR_ATTACHMENTSn tokens. GL_INVALID_ENUM is generated if n is less than 0. GL_INVALID_OPERATION is generated if a symbolic constant other than GL_NONE appears more than once in bufs. GL_INVALID_OPERATION is generated if any of the entries in bufs (other than GL_NONE ) indicates a color buffer that does not exist in the current GL context. GL_INVALID_VALUE is generated if n is greater than GL_MAX_DRAW_BUFFERS. ASSOCIATED GETS
glGet() with argument GL_MAX_DRAW_BUFFERS glGet() with argument GL_DRAW_BUFFERi where i indicates the number of the draw buffer whose value is to be queried SEE ALSO
glBlendFunc(), glColorMask(), glDrawBuffers(), glLogicOp(), glReadBuffer() COPYRIGHT
Copyright (C) 2003-2005 3Dlabs Inc. Ltd. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/. [FIXME: source] 05/30/2012 GLDRAWBUFFERS(3G)

Check Out this Related Man Page

GLDRAWBUFFER(3G)														  GLDRAWBUFFER(3G)

NAME
glDrawBuffer - specify which color buffers are to be drawn into C SPECIFICATION
void glDrawBuffer( GLenum mode ) PARAMETERS
mode Specifies up to four color buffers to be drawn into. Symbolic constants GL_NONE, GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT, GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, GL_FRONT_AND_BACK, and GL_AUXi, where i is between 0 and ``GL_AUX_BUFFERS'' -1, are accepted (GL_AUX_BUFFERS is not the upper limit; use glGet to query the number of available aux buffers.) The initial value is GL_FRONT for single-buffered contexts, and GL_BACK for double-buffered contexts. DESCRIPTION
When colors are written to the frame buffer, they are written into the color buffers specified by glDrawBuffer. The specifications are as follows: GL_NONE No color buffers are written. GL_FRONT_LEFT Only the front left color buffer is written. GL_FRONT_RIGHT Only the front right color buffer is written. GL_BACK_LEFT Only the back left color buffer is written. GL_BACK_RIGHT Only the back right color buffer is written. GL_FRONT 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. GL_BACK 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. GL_LEFT 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. GL_RIGHT 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. GL_FRONT_AND_BACK 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 buf- fers, only the front left color buffer is written. GL_AUXi Only auxiliary color buffer i is written. 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. Monoscopic contexts include only left buffers, and stereoscopic contexts include both left and right buffers. Likewise, single-buffered contexts include only front buffers, and double-buffered contexts include both front and back buffers. The context is selected at GL ini- tialization. NOTES
It is always the case that GL_AUXi = GL_AUX0 + i. ERRORS
GL_INVALID_ENUM is generated if mode is not an accepted value. GL_INVALID_OPERATION is generated if none of the buffers indicated by mode exists. GL_INVALID_OPERATION is generated if glDrawBuffer is executed between the execution of glBegin and the corresponding execution of glEnd. ASSOCIATED GETS
glGet with argument GL_DRAW_BUFFER glGet with argument GL_AUX_BUFFERS SEE ALSO
glBlendFunc(3G), glColorMask(3G), glIndexMask(3G), glLogicOp(3G), glReadBuffer(3G) GLDRAWBUFFER(3G)
Man Page