GLSTENCILMASK(3G)

🌸 NAME 🌸

okay bestie, this is the glStencilMask manual page, and it lives in the GLSTENCILMASK(3G) glow-up zone ([FIXME: manual] set, no cap). It's literally about controlling the front and back writing of individual bits in the stencil planes. iconic behavior only πŸ’…βœ¨

πŸŽ€ C SPECIFICATION πŸŽ€

void glStencilMask(GLuint mask);

πŸ¦‹ PARAMETERS πŸ¦‹

  • mask β€” a bit mask that enables and disables writing of individual bits in the stencil planes. Initially, the mask is all 1's. periodt πŸ’–

✨ DESCRIPTION ✨

glStencilMask controls the writing of individual bits in the stencil planes, and yes, it's giving very precise little bit-level gatekeeper energy. The least significant n bits of mask, where n is the number of bits in the stencil buffer, specify a mask. Where a 1 appears in the mask, it's possible to write to the corresponding bit in the stencil buffer. Where a 0 appears, the corresponding bit is write-protected. Initially, all bits are enabled for writing. slay πŸ”₯

There can be two separate mask writemasks (that's the wording, bestie, we don't make the rules): one affects back-facing polygons, and the other affects front-facing polygons as well as other non-polygon primitives. glStencilMask() sets both front and back stencil writemasks to the same values. Use glStencilMaskSeparate() to set front and back stencil writemasks to different values. iykyk 🫢

πŸ’œ NOTES πŸ’œ

glStencilMask() is the same as calling glStencilMaskSeparate() with face set to GL_FRONT_AND_BACK. no extra drama, just facts πŸ’€

🌈 ASSOCIATED GETS 🌈

glGet() with argument GL_STENCIL_WRITEMASK, GL_STENCIL_BACK_WRITEMASK, or GL_STENCIL_BITS.

πŸ‘‘ VERSION SUPPORT πŸ‘‘

The glStencilMask function/feature name is fully supported β€” every check is βœ” β€” for OpenGL versions:

  • 2.0 β€” βœ”
  • 2.1 β€” βœ”
  • 3.0 β€” βœ”
  • 3.1 β€” βœ”
  • 3.2 β€” βœ”
  • 3.3 β€” βœ”
  • 4.0 β€” βœ”
  • 4.1 β€” βœ”
  • 4.2 β€” βœ”
  • 4.3 β€” βœ”
  • 4.4 β€” βœ”
  • 4.5 β€” βœ”

that's a clean sweep, bestie πŸ§šπŸ’–

πŸ“ SEE ALSO πŸ“

  • glColorMask()
  • glDepthMask()
  • glStencilFunc()
  • glStencilFuncSeparate()
  • glStencilMaskSeparate()
  • glStencilOp()
  • glStencilOpSeparate()

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 Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group


mwah πŸ’‹ this page says [FIXME: source], dated 08/09/2021, and it's the GLSTENCILMASK(3G) manual page. periodt. 🌟

πŸ“¦ where this page comes from