GLCLEARDEPTH(3G)
β¨ GLCLEARDEPTH π
ok so bestie, welcome to glClearDepth β it's from the 3G part of the manual, which is where all the OpenGL girlies hang out π
π NAME π
glClearDepth β specify the clear value for the depth buffer. that's it, that's the whole vibe. it sets the number. the depth buffer gets that number when it gets cleared. iconic behavior honestly πΈ
π¦ C SPECIFICATION π¦
void glClearDepth( GLclampd depth )
look at her. one parameter. no drama. main character energy π₯
π PARAMETERS π
depthβ this is the depth value that gets used when the depth buffer is cleared. and ngl, the initial value is1. yes, one. she comes out the box with1and she's not sorry about it π
π DESCRIPTION π
okay so here's the tea β β glClearDepth specifies the depth value that glClear uses to clear the depth buffer. that's the whole job. that's what she does.
and here's the lil detail you gotta remember: values you hand to glClearDepth get clamped to the range [0, 1]. so if you try to be cute and pass something outside that, it gets squished back in. no exceptions, no negotiating, the range is the range π«Ά
π ERRORS π
GL_INVALID_OPERATIONgets generated ifglClearDepthis executed between the execution ofglBeginand the corresponding execution ofglEnd. like literally do not do that. it's not the moment. read the room π
fr fr, if you're chillin' inside aglBegin/glEndpair,glClearDepthis NOT the move. the error is gonna show up and it's gonna be awkward for everyone π
π ASSOCIATED GETS π
glGetwith argumentGL_DEPTH_CLEAR_VALUEβ this is how you peek at what the clear value currently is π
π§ SEE ALSO π§
glClear(3G)β the bestie that actually does the clearing.glClearDepthjust tells her what number to use π«Ά
ok that's the whole page, you ate that, go clear some depth buffers bestie πβ¨
sign-off time: this was GLCLEARDEPTH(3G) β the 3G manual, page name GLCLEARDEPTH β source and version and date all wrapped up in that one glorious footer line. mwah π
π¦ 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