lsetde(3G)lsetde(3G)NAMElsetde - sets the depth range
FORTRAN SPECIFICATION
subroutine lsetde(near, far)
integer*4 near, far
PARAMETERS
near expects the screen coordinate of the near clipping plane.
far expects the screen coordinate of the far clipping plane.
DESCRIPTION
viewpo specifies the mapping of the left, right, bottom, and top clipping
planes into screen coordinates. lsetde completes this mapping for
homogeneous world coordinates; it specifies the mapping of the near and
far clipping planes into values stored in the z-buffer.
lsetde is used in z-buffering, depth-cueing, and certain feedback
applications.
The valid range of the parameters depends on the state of the GLCZRA
compatibility mode (see glcomp). If it is 0, the valid range depends on
the graphics hardware. When multisample is enabled, and multisample
buffers exist in the current framebuffer configuration in the current
drawmode, the minimum is the value returned by getgco(GCMZMI) and the
maximum is the value returned by getgco(GCMZMA). Otherwise, the minimum
is the value returned by getgco(GCZMIN) and the maximum is the value
returned by getgco(GCZMAX). If the state of the GLCZRA compatibility
mode is 1, the minimum is $0 and the maximum is $7FFFFF. The depth range
defaults to the full range supported by the graphics hardware.
Acceptable mappings include all those where both near and far are within
the supported range, including mappings where near > far. In particular,
it is sometimes desirable to call lsetde($7FFFFF, $0) on IRIS-4D GT and
GTX models.
SEE ALSO
depthc, feedba, getgde, glcomp, zbuffe
NOTES
Error accumulation in the iteration of z can cause wrapping when the full
depth range supported by the graphics hardware is used. (An iteration
wraps when it accidentally converts an large positive value into a
negative value, or vice versa.) While the effects of wrapping are
typically not observed, if they are, they can be eliminated by reducing
the depth range by a small percentage.
When using this routine, you should always explicitly set the GLCZRA mode
of glcomp because its default is different on different models.
Page 1