GLCLEARSTENCIL(3G)
π GLCLEARSTENCIL π
okay so bestie, we're in the 3G manual today and the star of the show is glClearStencil β yes, that's the whole vibe, and honestly? it ate.
β¨ NAME β¨
glClearStencil β specify the clear value for the stencil buffer π
π§ C SPECIFICATION π§
void glClearStencil(GLint s);
that's it. that's the whole function signature. iconic minimalism. π
πΈ PARAMETERS πΈ
sβ the index used when the stencil buffer is cleared. the initial value is0. yes, zero, the main character of default values. π
π¦ DESCRIPTION π¦
so here's the tea: glClearStencil specifies the index that glClear() uses to clear the stencil buffer. that's its whole job and it does it flawlessly, no notes. π«Ά
now the little technical moment β s gets masked with 2^m - 1, where m is the number of bits in the stencil buffer. like, it's giving bitwise filter, and honestly it's lowkey slay of the spec to just tell you that straight up. β¨
β ASSOCIATED GETS β
glGet()with argumentGL_STENCIL_CLEAR_VALUEglGet()with argumentGL_STENCIL_BITS
go get your values, bestie, they're right there. π
π₯ VERSION SUPPORT π₯
the function/feature name in question is glClearStencil, and the OpenGL versions are 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, and 4.5. and the support? literally every single one of them. not one flop in the bunch:
glClearStencilβ OpenGL2.0β βglClearStencilβ OpenGL2.1β βglClearStencilβ OpenGL3.0β βglClearStencilβ OpenGL3.1β βglClearStencilβ OpenGL3.2β βglClearStencilβ OpenGL3.3β βglClearStencilβ OpenGL4.0β βglClearStencilβ OpenGL4.1β βglClearStencilβ OpenGL4.2β βglClearStencilβ OpenGL4.3β βglClearStencilβ OpenGL4.4β βglClearStencilβ OpenGL4.5β β
twelve for twelve. undefeated. no cap. ππ
π SEE ALSO π
like, go read these too, they're all in the same friend group:
glClear()glStencilFunc()glStencilFuncSeparate()glStencilMask()glStencilMaskSeparate()glStencilOp()glStencilOpSeparate()
iykyk. π§
π 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 Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group
legal stuff is not the vibe but we respect it fr fr β the SGI Free Software B License is the moment here, and the link is right there for the details. π«‘
okay that's the whole page, go clear some stencil buffers, you're gonna do amazing πβ¨
and a lil sign-off for the credits: this came from [FIXME: source], dated 08/09/2021, in the GLCLEARSTENCIL(3G) manual. periodt. π
π
π¦ 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