Name
gl.ReadBuffer -- select a color buffer source for pixels
Synopsis
gl.ReadBuffer(mode)
Function
gl.ReadBuffer() specifies a color buffer as the source for subsequent gl.ReadPixels(), gl.CopyTexImage(), gl.CopyTexSubImage(), and gl.CopyPixels() commands. mode accepts one of twelve or more predefined values. #GL_AUX0 through #GL_AUX3 are always defined. In a fully configured system, #GL_FRONT, #GL_LEFT, and #GL_FRONT_LEFT all name the front left buffer, #GL_FRONT_RIGHT and #GL_RIGHT name the front right buffer, and #GL_BACK_LEFT and #GL_BACK name the back left buffer.

Non-stereo double-buffered configurations have only a front left and a back left buffer. Single-buffered configurations have a front left and a front right buffer if stereo, and only a front left buffer if nonstereo. It is an error to specify a non-existent buffer to gl.ReadBuffer().

mode is initially #GL_FRONT in single-buffered configurations and #GL_BACK in double-buffered configurations.

Please consult an OpenGL reference manual for more information.

Inputs
mode
specifies a color buffer (see above)
Errors
#GL_INVALID_ENUM is generated if mode is not one of the twelve (or more) accepted values.

#GL_INVALID_OPERATION is generated if mode specifies a buffer that does not exist.

#GL_INVALID_OPERATION is generated if gl.ReadBuffer() is executed between the execution of gl.Begin() and the corresponding execution of gl.End().

Associated gets
gl.Get() with argument #GL_READ_BUFFER


Show TOC