GLDEPTHMASK(3G)
π GLDEPTHMASK(3G) β the depth-buffer-write on/off switch
okay so first things first: this is page GLDEPTHMASK from section 3G of the manual, and the manual name up top is literally [FIXME: manual] β placeholder energy, but we move π«Ά
β¨ NAME β¨
glDepthMask β turn writing into the depth buffer on or off, bestie. that's it. that's the whole gig.
πΈ C SPECIFICATION πΈ
void glDepthMask(GLboolean flag);
π PARAMETERS π
flagβ says whether the depth buffer is enabled for writing. ifflagisGL_FALSE, depth buffer writing is disabled (off, cancelled, not today π). otherwise it's enabled. and bestie, listen: initially, depth buffer writing is enabled. default is on. she starts slaying immediately.
β DESCRIPTION β
so glDepthMask specifies whether the depth buffer is enabled for writing. if flag is GL_FALSE, depth buffer writing is disabled. otherwise (any other value, babes) it's enabled. initially, depth buffer writing is enabled.
that's the entire description. it's giving short and iconic, no cap. literally the same tea as the parameters section β the man page said it twice and honestly? mood. π
π¦ ASSOCIATED GETS π¦
glGet()with argumentGL_DEPTH_WRITEMASKβ that's how you peek at the current vibe check value, iykyk.
π₯ NOTES π₯
β οΈ this is the part everyone gets wrong, so pay attention bestie:
even if the depth buffer exists and the depth mask is non-zero, the depth buffer is not updated if the depth test is disabled. like, she's there, she's ready, but the depth test said "not today" and nothing gets written. π
so if you want to unconditionally write to the depth buffer, the depth test should be enabled and set to GL_ALWAYS β see glDepthFunc(). that's the combo. enable the test, set it to GL_ALWAYS, and now the writes go through, periodt.
π VERSION SUPPORT π
the original put this in a whole big table with "OpenGL Version" across the top and "Function / Feature Name" down the side. we're doing it as a list because tables are not the vibe here, but every single β survived, don't worry π
glDepthMaskβ OpenGL 2.0 βglDepthMaskβ OpenGL 2.1 βglDepthMaskβ OpenGL 3.0 βglDepthMaskβ OpenGL 3.1 βglDepthMaskβ OpenGL 3.2 βglDepthMaskβ OpenGL 3.3 βglDepthMaskβ OpenGL 4.0 βglDepthMaskβ OpenGL 4.1 βglDepthMaskβ OpenGL 4.2 βglDepthMaskβ OpenGL 4.3 βglDepthMaskβ OpenGL 4.4 βglDepthMaskβ OpenGL 4.5 β
all twelve, all checked, no notes. she ate and left zero crumbs. β¨
π SEE ALSO π
glColorMask()glDepthFunc()glDepthRange()glStencilMask()
go read those too, bestie, they're the friend group π«Ά
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
π COPYRIGHT (yes, again β the og page really has two of these) π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group
and that's the page! πΈ sending you off with the source line [FIXME: source] (also a placeholder, we love a mysterious queen) and the date 08/09/2021 β signed, sealed, dated, iconic. 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