GLDEPTHRANGE(3G)
π NAME π
okay so bestie, this is GLDEPTHRANGE(3G) β the manual page for glDepthRange, and it's literally here to specify mapping of depth values from normalized device coordinates to window coordinates. no cap. π¦
π C SPECIFICATION π
void glDepthRange(GLdouble nearVal, GLdouble farVal);
void glDepthRangef(GLfloat nearVal, GLfloat farVal);
πΈ PARAMETERS πΈ
nearValβ specifies the mapping of the near clipping plane to window coordinates. The initial value is0. β¨farValβ specifies the mapping of the far clipping plane to window coordinates. The initial value is1. β¨
π¦ DESCRIPTION π¦
so after clipping and division by w, depth coordinates range from -1 to 1, corresponding to the near and far clipping planes. glDepthRange specifies a linear mapping of the normalized depth coordinates in this range to window depth coordinates. π
regardless of the actual depth buffer implementation, window coordinate depth values are treated as though they range from 0 through 1 (like color components). thus, the values accepted by glDepthRange are both clamped to this range before they are accepted. π
the setting of (0,1) maps the near plane to 0 and the far plane to 1. with this mapping, the depth buffer range is fully utilized. slay. π₯
π NOTES π
- it is not necessary that
nearValbe less thanfarVal. reverse mappings such asnearVal = 1, andfarVal = 0are acceptable. π - the type of the
nearValandfarValparameters was changed fromGLclampftoGLfloatforglDepthRangefand fromGLclampdtoGLdoubleforglDepthRange. this change is transparent to user code and is described in detail on theremovedTypes()page. π«Ά
π ASSOCIATED GETS π
glGet() with argument GL_DEPTH_RANGE β that's the get, bestie. π
β VERSION SUPPORT β
the vibe check is: rows are Function / Feature Name, columns are OpenGL Version. here's every single one, no skips:
glDepthRangeβ2.0β,2.1β,3.0β,3.1β,3.2β,3.3β,4.0β,4.1β,4.2β,4.3β,4.4β,4.5βglDepthRangefβ2.0-,2.1-,3.0-,3.1-,3.2-,3.3-,4.0-,4.1β,4.2β,4.3β,4.4β,4.5β
π§ SEE ALSO π§
go check out glDepthFunc(), glPolygonOffset(), glViewport(), and removedTypes(). 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 π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group
okay that's the whole vibe β source/version tag is [FIXME: source], dated 08/09/2021, and this is GLDEPTHRANGE(3G) signing off π
β¨
π¦ 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