GLSTENCILMASK(3G)
π GLSTENCILMASK(3G) β the stencil-mask glow-up
okay so bestie, this is GLSTENCILMASK(3G) and it's literally the function that controls the writing of individual bits in the stencil planes. no cap, it's niche but iconic. let's get into it β¨
πΈ NAME πΈ
glStencilMask β control the writing of individual bits in the stencil planes π
β¨ C SPECIFICATION β¨
void glStencilMask( GLuint mask )
like, that's the whole signature. short, sweet, main character energy π
π«Ά PARAMETERS π«Ά
maskβ specifies a bit mask to enable and disable writing of individual bits in the stencil planes. initially, the mask is all 1's. yes bestie, all of them at the start π
π DESCRIPTION π
glStencilMask controls the writing of individual bits in the stencil planes. periodt.
the least significant n bits of mask β where n is the number of bits in the stencil buffer β specify a mask. so basically:
- 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. so fresh out of the gate, everything's writable, no restrictions, free spirit vibes π¦
π ERRORS π
GL_INVALID_OPERATION is generated if glStencilMask is executed between the execution of glBegin and the corresponding execution of glEnd.
bes, do not call this betweenglBeginandglEnd. it's giving forbidden era and the GL will literally call you out π
π₯ ASSOCIATED GETS π₯
glGetwith argumentGL_STENCIL_WRITEMASKglGetwith argumentGL_STENCIL_BITS
iykyk, these are the little lore drops you can query later π
π SEE ALSO π
glColorMask(3G)glDepthMask(3G)glIndexMask(3G)glStencilFunc(3G)glStencilOp(3G)
the whole mask-and-stencil friend group, honestly obsessed π§
later bestie, this was GLSTENCILMASK(3G) β mwah, go slay some stencil bits ππ
π¦ where this page comes from
- opensuse-leap 16.0: Mesa-libGL-devel 24.1.7-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms