![]() -> Click here to learn how to get live help <- |
GLFRUSTUMIndexNAMEglFrustum - multiply the current matrix by a perspective matrixC SPECIFICATIONvoid f3glFrustumfP( GLdouble fIleftfP,f2leftfP, f2rightfP Specify the coordinates for the left and right vertical clipping planes.
DESCRIPTION%f3glFrustumfP describes a perspective matrix that produces a perspective projection. The current matrix (see %f3glMatrixModefP) is multiplied by this matrix and the result replaces the current matrix, as if %f3glMultMatrixfP were called with the following matrix as its argument:
ccol { {{2 ~ "near_val"} over {"right" ~-~ "left"}} above 0 above 0 above 0 } ccol { 0 above {{2 ~ "near_val"} over {"top" ~-~ "bottom"}} ~ above 0 above 0 } ccol { A ~~~~ above B ~~~~ above C ~~~~ above -1 ~~~~} ccol { 0 above 0 above D above 0} }} ~~~ right ]}
Typically, the matrix mode is %f3GL_PROJECTIONfP, and (f2leftfP, f2bottomfP, -f2near_valfP) and (f2rightfP, f2topfP, -f2near_valfP) specify the points on the near clipping plane that are mapped to the lower left and upper right corners of the window, assuming that the eye is located at (0, 0, 0). -f2far_valfP specifies the location of the far clipping plane. Both f2near_valfP and f2far_valfP must be positive. Use %f3glPushMatrixfP and %f3glPopMatrixfP to save and restore the current matrix stack. NOTESDepth buffer precision is affected by the values specified for f2near_valfP and f2far_valfP. The greater the ratio of f2far_valfP to f2near_valfP is, the less effective the depth buffer will be at distinguishing between surfaces that are near each other. If
roughly $log sub 2 (r)$ bits of depth buffer precision are lost. Because $r$ approaches infinity as f2near_valfP approaches 0, f2near_valfP must never be set to 0. ERRORS%f3GL_INVALID_VALUEfP is generated if f2near_valfP or f2far_valfP is not positive, or if f2leftfP = f2rightfP, or f2bottomfP = f2topfP. %f3GL_INVALID_OPERATIONfP is generated if %f3glFrustumfP is executed between the execution of %f3glBeginfP and the corresponding execution of %f3glEndfP.ASSOCIATED GETS%f3glGetfP with argument %f3GL_MATRIX_MODEfP%f3glGetfP with argument %f3GL_MODELVIEW_MATRIXfP %f3glGetfP with argument %f3GL_PROJECTION_MATRIXfP %f3glGetfP with argument %f3GL_TEXTURE_MATRIXfP %f3glGetfP with argument %f3GL_COLOR_MATRIXfP SEE ALSO%f3glOrtho(3G)fP, %f3glMatrixMode(3G)fP, %f3glMultMatrix(3G)fP, %f3glPushMatrix(3G)fP, %f3glViewport(3G)fP
Index |