GLINDEXMASK(3G)
π
GLINDEXMASK β ok so this is from the 3G manual, bestie, and it's literally about controlling which bits get written in your color index buffers β¨
π NAME π
glIndexMask β control the writing of individual bits in the color index buffers π
Like, individual bits. Not the whole buffer. We're being β¨preciseβ¨ today.
πΈ C SPECIFICATION πΈ
void glIndexMask( GLuint mask )
That's it. One argument. So demure. So mindful. π§
π¦ PARAMETERS π¦
maskβ specifies a bit mask that enables and disables the writing of individual bits in the color index buffers. Initially, the mask is all 1's. (yes babe, all ones, everything unlocked, the whole buffet π)
β¨ DESCRIPTION β¨
Okay so here's the tea, bestie π« β glIndexMask controls the writing of individual bits in the color index buffers.
The least significant n bits of mask β where n is the number of bits in a color index buffer β specify a mask. So it's like, the mask matches the buffer size, iykyk.
Where a 1 (one) appears in the mask, it's possible to write to the corresponding bit in the color index buffer (or buffers) π₯. Where a 0 (zero) appears, the corresponding bit is write-protected π« β hands off, that bit said no.
This mask is used only in color index mode π β not RGB mode, don't get it twisted. And it affects only the buffers currently selected for writing (see glDrawBuffer). Initially, all bits are enabled for writing, no cap π―.
π ERRORS π
GL_INVALID_OPERATIONis generated ifglIndexMaskis executed between the execution ofglBeginand the corresponding execution ofglEnd.
fr fr do not call this inside aglBegin/glEndblock. The GL will literally yell at you. π¨
π ASSOCIATED GETS π
glGetwith argumentGL_INDEX_WRITEMASK
(the way you can just ask the GL what your mask is, obsessed π)
π SEE ALSO π
glColorMask(3G)glDepthMask(3G)glDrawBuffer(3G)glIndex(3G)glIndexPointer(3G)glStencilMask(3G)
Go read those too, they're all part of the mask squad π
okay that's the whole page bestie, no notes π β¨
And a lil sign-off from me to you: this one lives under the GLINDEXMASK(3G) name in the 3G manual β same title up top, same title at the bottom, iconic symmetrical moment ππ¦π
π¦ 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 on : a language model's rewrite of the original, under its terms