gldepthrange(3) - Linux man page - Die.net

文章推薦指數: 80 %
投票人數:10人

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 ... gldepthrange(3)-Linuxmanpage Name glDepthRange-specifymappingofdepthvaluesfromnormalizeddevicecoordinatestowindowcoordinates CSpecification voidglDepthRange(GLclampdnear_val, GLclampdfar_val) Parameters near_val Specifiesthemappingofthenearclippingplanetowindowcoordinates.Theinitialvalueis0. far_val Specifiesthemappingofthefarclippingplanetowindowcoordinates.Theinitialvalueis1. Description Afterclippinganddivisionbyw,depthcoordinatesrangefrom-1to1,correspondingtothenearandfarclippingplanes.glDepthRange specifiesalinearmappingofthenormalizeddepthcoordinatesinthisrangetowindowdepthcoordinates.Regardlessoftheactualdepthbufferimplementation, windowcoordinatedepthvaluesaretreatedasthoughtheyrangefrom0through1(likecolorcomponents).Thus,thevaluesacceptedbyglDepthRangeare bothclampedtothisrangebeforetheyareaccepted. Thesettingof(0,1)mapsthenearplaneto0andthefarplaneto1.Withthismapping,thedepthbufferrangeisfullyutilized. Notes Itisnotnecessarythatnear_valbelessthanfar_val.Reversemappingssuchas$"near_val"~=~1$,and$"far_val"~=~0$are acceptable. Errors GL_INVALID_OPERATIONisgeneratedifglDepthRangeisexecutedbetweentheexecutionofglBeginandthecorrespondingexecutionof glEnd. AssociatedGets glGetwithargumentGL_DEPTH_RANGE SeeAlso glDepthFunc(3G),glPolygonOffset(3G),glViewport(3G) SiteSearch Library linuxdocs linuxmanpages pageloadtime Toys worldsunlight moonphase traceexplorer



請為這篇文章評分?