Specify which color buffers are to be drawn into.
C Specification |
 |
void glDrawBuffer(GLenum mode)
|
Parameters |
 |
- mode
Specifies which buffers are to be drawn into. Symbolic constants
GL_FRONT_LEFT, GL_BACK_LEFT, GL_FRONT, and
GL_BACK are accepted.
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_FRONT_LEFT
Only the front left color buffer is written.
- GL_BACK_LEFT
Only the back left 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.
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 IVL initialization time.
Defaults |
 |
The default value of mode is GL_FRONT for single-buffered
contexts, and GL_BACK for double-buffered contexts.
Notes |
 |
Stereo is not supported in the first release of IVL. Hence,
GL_FRONT_LEFT is equivalent to GL_FRONT, and
GL_BACK_LEFT is equivalent to GL_BACK. Use the buffer names
that allow your application to work properly should it ever be run on a system
that supports stereo windows. Non-stereo applications will typically use
GL_FRONT and GL_BACK.
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.
Associated Gets |
 |
glGet (GL_DRAW_BUFFER)
See Also |
 |
glGet,
glReadBuffer.