GlColorMask

From QB64 Phoenix Edition Wiki
Revision as of 06:09, 30 April 2022 by SMcNeill (talk | contribs) (Created page with "'''_glColorMask, glColorMaski:''' enable and disable writing of frame buffer color components {{PageSyntax}} :: SUB _glColorMask (BYVAL red AS _UNSIGNED _BYTE, BYVAL green AS _UNSIGNED _BYTE, BYVAL blue AS _UNSIGNED _BYTE, BYVAL alpha AS _UNSIGNED _BYTE) :: void '''_glColorMask'''(GLboolean {{Parameter|red}}, GLboolean {{Parameter|green}}, GLboolean {{Parameter|blue}}, GLboolean {{Parameter|alpha}}); :: void '''_glColorMaski'''(GLuint {{Parameter|buf}}, GLboolean {...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

_glColorMask, glColorMaski: enable and disable writing of frame buffer color components


Syntax

SUB _glColorMask (BYVAL red AS _UNSIGNED _BYTE, BYVAL green AS _UNSIGNED _BYTE, BYVAL blue AS _UNSIGNED _BYTE, BYVAL alpha AS _UNSIGNED _BYTE)
void _glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
void _glColorMaski(GLuint buf, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
buf
For _glColorMaski, specifies the index of the draw buffer whose color mask to set.
red, green, blue, alpha
Specify whether red, green, blue, and alpha are to be written into the frame buffer. The initial values are all Template:KW, indicating that the color components are written.


Description

_glColorMask and _glColorMaski specify whether the individual color components in the frame buffer can or cannot be written. _glColorMaski sets the mask for a specific draw buffer, whereas _glColorMask sets the mask for all draw buffers. If red is Template:KW, for example, no change is made to the red component of any pixel in any of the color buffers, regardless of the drawing operation attempted.

Changes to individual bits of components cannot be controlled. Rather, changes are either enabled or disabled for entire color components.


Template:PageErrors

Template:KW is generated if buf is greater than Template:KW minus 1.


Template:PageUseWith

Template:KW with argument Template:KW


See also

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


Template:PageCopyright