[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
GL3.2 Version 4.1 for AIX: Programming Concepts

Depth-Cueing in Color Map Mode

For depth-cueing to work properly, the color map locations specified by the lshaderange subroutine must be loaded with a series of colors that gradually increase or decrease intensity. The lshaderange subroutine specifies the low-intensity color map index (lowindex) and the high-intensity color map index (highindex). These values are mapped to the low and high z values specified by z1 and z2. The high index must be greater than the low index and the difference between the high index and the low index must be less than the difference between z1 and z2.

The values of z1 and z2 should correspond to or lie within the range of z values specified by the lsetdepth subroutine, which delineates the entire transformation range. The lshaderange subroutine specifies the range of values where all of the shading is to occur.

The entries for the color map between the low index and the high index should reflect the appropriate sequence of intensities for the color being drawn. When a depth-cued point is drawn, its z value is used to determine its intensity. When a depth-cued line is drawn, the intensities of its points are linearly interpolated from the intensities of its endpoints, which are determined from their z values. You can achieve higher resolution if the near and far clipping planes bound the object as closely as possible.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]