GLCOLORMASK(3G)
π GLCOLORMASK(3G) β the 3G manual, bestie π
okay so real talk: this is the page for glColorMask and glColorMaski, living in the 3G manual. It's all about turning the writing of frame buffer color components on and off. iconic behaviour, honestly.
β¨ NAME β¨
glColorMask, _glColorMaski β enable and disable writing of frame buffer color components π¨
π«Ά C SPECIFICATION π«Ά
void glColorMask(GLboolean red, GLboolean green, GLboolean blue,
GLboolean alpha);
void glColorMaski(GLuint buf, GLboolean red, GLboolean green,
GLboolean blue, GLboolean alpha);
π PARAMETERS π
bufβ forglColorMaski, this is the index of the draw buffer whose color mask you're setting. like, which one bestie. πred,green,blue,alphaβ these say whether red, green, blue and alpha get written into the frame buffer. the initial values are allGL_TRUE, meaning yes, the color components are being written. as they should. π
π₯ DESCRIPTION π₯
So glColorMask and glColorMaski specify whether the individual color components in the frame buffer can or cannot be written. that's the whole vibe check.
glColorMaski sets the mask for one specific draw buffer, whereas glColorMask sets the mask for all the draw buffers. main character energy vs. group chat energy, lowkey.
If red is GL_FALSE, for example, then no change is made to the red component of any pixel in any of the color buffers β regardless of the drawing operation you attempted. like, it's just not happening. periodt. π«
β οΈ heads up: changes to individual bits of components cannot be controlled. it's giving all-or-nothing. rather, changes are either enabled or disabled for entire color components. no in-between, no partial slay. π
πΈ ASSOCIATED GETS πΈ
glGet() with argument GL_COLOR_WRITEMASK β that's how you peek at it, iykyk π΅οΈ
π VERSION SUPPORT π
okay so here's the tea, version by version β (ranges are inclusive, no cap):
glColorMask β fully supported, all checkmarks β from 2.0 through 4.5. every single one: 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5. ate. π
glColorMaski β not a thing in 2.0 and 2.1 (marked -), then supported β from 3.0 all the way to 4.5: 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5. glow-up arc fr fr β¨
π¦ SEE ALSO π¦
glClear()glDepthMask()glStencilMask()
go read those too, bestie, they're all in the same friend group π«Ά
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
π COPYRIGHT (yes, again) π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group
okay that's the whole page!! π source was [FIXME: source] and it's dated 08/09/2021 β so this info is from back in 2021, still iconic tho. mwah π β¨ππ·
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms