Mac Developer Library Developer


This manual page is part of Xcode Tools version 5.0

To obtain these tools:

If you are running a version of Xcode Tools other than 5.0, view the documentation locally:

  • In Xcode

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • To learn how the manual is organized or to learn about command syntax, read the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Developer Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.

GLCOLORMASK(3G)                                                                              GLCOLORMASK(3G)

       glColorMask - enable and disable writing of frame buffer color components

       void glColorMask( GLboolean red,
                         GLboolean green,
                         GLboolean blue,
                         GLboolean alpha )

       red, green, blue, alpha
                             Specify  whether  red, green, blue, and alpha can or cannot be written into the
                             frame buffer.  The initial values are all GL_TRUE, indicating  that  the  color
                             components can be written.

       glColorMask  specifies  whether  the individual color components in the frame buffer can or cannot be
       written.  If red is GL_FALSE, 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.

       GL_INVALID_OPERATION is generated if glColorMask is executed between the execution of glBegin and the
       corresponding execution of glEnd.

       glGet with argument GL_COLOR_WRITEMASK
       glGet with argument GL_RGBA_MODE

       glClear(3G), glColor(3G), glColorPointer(3G), glDepthMask(3G), glIndex(3G), glIndexPointer(3G), glIndexMask(3G), glStencilMask(3G)


Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation to the OpenGL project.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.