GL.glDepthRange() - Pike Reference Manual

文章推薦指數: 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 ... ➤GL.glDepthMask() GL.glDisable()➤ MethodGL.glDepthRange() Method glDepthRange voidglDepthRange(floatzNear,floatzFar) Description Afterclippinganddivisionbyw, depthcoordinatesrangefrom-1to1, correspondingtothenearandfarclippingplanes. glDepthRangespecifiesalinearmappingofthenormalizeddepthcoordinates inthisrangetowindowdepthcoordinates. Regardlessoftheactualdepthbufferimplementation, windowcoordinatedepthvaluesaretreatedasthoughtheyrange from0through1(likecolorcomponents). Thus, thevaluesacceptedbyglDepthRangearebothclampedtothisrange beforetheyareaccepted. Thesettingof(0,1)mapsthenearplaneto0and thefarplaneto1. Withthismapping, thedepthbufferrangeisfullyutilized. ParameterzNear Specifiesthemappingofthenearclippingplanetowindowcoordinates. Theinitialvalueis0. ParameterzFar Specifiesthemappingofthefarclippingplanetowindowcoordinates. Theinitialvalueis1. Throws GL_INVALID_OPERATIONisgeneratedifglDepthRange isexecutedbetweentheexecutionofglBegin andthecorrespondingexecutionofglEnd.



請為這篇文章評分?