glBlendFunc, glColorMask, glDrawBuffers, glIndexMask, glLogicOp, glReadBuffer
Copyright 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/.
Page generated by adrdox
glDrawBuffers: man2/glDrawBuffers.xml
glDrawBuffers defines an array of buffers into which fragment color values or fragment data will be written. If no fragment shader is active, rendering operations will generate only one fragment color per fragment and it will be written into each of the buffers specified by bufs. If a fragment shader is active and it writes a value to the output variable gl_FragColor, then that value will be written into each of the buffers specified by bufs. If a fragment shader is active and it writes a value to one or more elements of the output array variable gl_FragData[], then the value of gl_FragData[0] will be written into the first buffer specified by bufs, the value of gl_FragData[1] will be written into the second buffer specified by bufs, and so on up to gl_FragData[n-1]. The draw buffer used for gl_FragDatan and beyond is implicitly set to be GL_NONE. The symbolic constants contained in bufs may be any of the following: 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. The number of auxiliary buffers can be queried by calling glGet with the argument GL_AUX_BUFFERS.
glDrawBuffers is available only if the GL version is 2.0 or greater. It is always the case that GL_AUXi = GL_AUX0 + i. 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 writes to neither gl_FragColor nor gl_FragData, 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.