color(3G)
color, colorf - sets the color index in the current draw mode
As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.
NAME color, colorf - sets the color index in the current draw mode FORTRAN 77 SPECIFICATION subroutine color(c) integer*4 c subroutine colorf(c) real c PARAMETERS c expects an index into the current color map. DESCRIPTION color sets the color index of the currently active GL framebuffer, one of normal, popup, overlay, or underlay (see drawmo). The current framebuffer must be in color map mode (see cmode) for the color command to be applicable. Most drawing commands copy the current color index into the color bitplanes of the current framebuffer. color is retained in each draw mode, so when a draw mode is re-entered, color is reset to the last value specified in that draw mode. color values range from 0 through 2n-1, where n is the number of bitplanes available in the current draw mode. n can be ascertained by calling getpla while in the desired draw mode, or by calling getgde at any time. Color indices larger than 2n-1 are clamped to 2n-1; color indices less than zero yield undefined results. The color displayed by a given color index is determined by the current color map (see mapcol.) Each draw mode has its own color map. colorf is similar to color, except that it expects a floating point color index. Before the color is written into display memory, it is rounded to the nearest integer value. When dithering is enabled and the hardware supports it, the extra precision is used in the dithering. Also, when drawing with the GOURAU shading model, machines that iterate color indices with fractional precision yield more precise shading results using colorf than with color. It is an error to call color or colorf while the current framebuffer is in RGB mode. The color indices of all framebuffers in color map mode are set to zero when gconfi is called. SEE ALSO drawmo, getcol, mapcol, writem NOTE IRIS-4D B, G, GT, and GTX models do not iterate color with fractional precision, nor do early serial numbers of the Personal Iris. Use getgde(GDCIFR) to determine whether fractional color index iteration is supported.