GlReadBuffer

From QB64 Phoenix Edition Wiki
Revision as of 14:28, 31 May 2022 by RhoSigma (talk | contribs) (Protected "GlReadBuffer" ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)))
Jump to navigation Jump to search

_glReadBuffer: select a color buffer source for pixel read operations from the current read framebuffer.


Syntax

 SUB _glReadBuffer (BYVAL mode AS _UNSIGNED LONG)
 void _glReadBuffer(GLenum mode);


mode
Specifies a color buffer. Accepted values are Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, and the constants Template:KW.


Description

_glReadBuffer specifies which color buffer within the current bound Template:KW will be used as the source for pixel reading commands. These commands include: Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, and Template:KW.

mode accepts one of twelve or more predefined values. If the default framebuffer (the zero framebuffer object)is bound to Template:KW, then the following enumerators can be used: Template:KW, Template:KW, and Template:KW all name the front left buffer, Template:KW and Template:KW name the front right buffer, and Template:KW and Template:KW name the back left buffer. Nonstereo 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.

If a non-zero framebuffer object is bound, then the constants Template:KW may be used to indicate the i<sup>th</sup> color attachment, where i ranges from zero to the value of Template:KW minus one.

It is an error to specify a nonexistent buffer to _glReadBuffer.

For the default framebuffer, mode is initially Template:KW in single-buffered configurations and Template:KW in double-buffered configurations. For framebuffer objects, the default read buffer is Template:KW.


Template:PageErrors

Template:KW is generated if mode is not one of the twelve (or more) accepted values.

Template:KW is generated if mode specifies a buffer that does not exist.


Template:PageUseWith

Template:KW with argument Template:KW


See also

SUB _GL Template:KW, Template:KW, Template:KW, Template:KW


Template:PageCopyright

Copyright 1991-2006 Silicon Graphics, Inc. Copyright 2011 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.