glDepthRange - OpenGL 4 Reference Pages - Khronos Group
文章推薦指數: 80 %
glDepthRange specifies a linear mapping of the normalized depth coordinates in this range to window depth coordinates. Regardless of the actual depth buffer ... Name glDepthRange—specifymappingofdepthvaluesfromnormalizeddevicecoordinatestowindowcoordinates CSpecification voidglDepthRange( GLdoublenearVal, GLdoublefarVal); voidglDepthRangef( GLfloatnearVal, GLfloatfarVal); Parameters nearVal Specifiesthemappingofthenearclippingplanetowindowcoordinates. Theinitialvalueis0. farVal Specifiesthemappingofthefarclippingplanetowindowcoordinates. Theinitialvalueis1. Description Afterclippinganddivisionbyw, depthcoordinatesrangefrom -1 to1, correspondingtothenearandfarclippingplanes. glDepthRangespecifiesalinearmappingofthenormalizeddepthcoordinates inthisrangetowindowdepthcoordinates. Regardlessoftheactualdepthbufferimplementation, windowcoordinatedepthvaluesaretreatedasthoughtheyrange from0through1(likecolorcomponents). Thus, thevaluesacceptedbyglDepthRangearebothclampedtothisrange beforetheyareaccepted. Thesettingof(0,1)mapsthenearplaneto0and thefarplaneto1. Withthismapping, thedepthbufferrangeisfullyutilized. Notes ItisnotnecessarythatnearValbelessthanfarVal. Reversemappingssuchas nearVal = 1 , and farVal = 0 areacceptable. ThetypeofthenearValand farValparameterswaschangedfrom GLclampftoGLfloatforglDepthRangef andfromGLclampdtoGLdoublefor glDepthRange.Thischangeis transparenttousercodeandisdescribedindetailonthe removedTypes page. AssociatedGets glGetwithargumentGL_DEPTH_RANGE VersionSupport OpenGLVersion Function/FeatureName 2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5 glDepthRange ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ glDepthRangef - - - - - - - ✔ ✔ ✔ ✔ ✔ SeeAlso glDepthFunc, glPolygonOffset, glViewport, removedTypes Copyright Copyright©1991-2006SiliconGraphics,Inc. Copyright©2010-2014KhronosGroup. ThisdocumentislicensedundertheSGIFreeSoftwareBLicense. Fordetails,see https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt.
延伸文章資訊
- 1gldepthrange(3) - Linux man page - Die.net
After clipping and division by w, depth coordinates range from -1 to 1, corresponding to the near...
- 2glDepthRange - OpenGL 4 Reference Pages - Khronos Group
glDepthRange specifies a linear mapping of the normalized depth coordinates in this range to wind...
- 3OpenGL: glDepthRange的理解_Augusdi的博客
与x和y窗口坐标不同,在OpenGL中,z坐标总是被认为位于0.0~1.0的范围之间。可通过glDepthRange()调整。API中队glDepthRange的解释:After clippin...
- 4how does glDepthRange work? - Stack Overflow
glDepthRange specifies a linear mapping of the normalized depth coordinates in this range to wind...
- 5glDepthRange_百度百科
glDepthRange specifies a linear mapping of the normalized z coordinates in this range to window z...