Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ color(3G) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



color(3G)                                                            color(3G)



NAME
     color, colorf - sets the color index in the current draw mode

C SPECIFICATION
     void color(c)
     Colorindex c;

     void colorf(c)
     float 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 drawmode).  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.

n
color values range from 0 through 2 -1, where n is the number of
bitplanes available in the current draw mode. n can be ascertained by calling getplanes while in the desired draw mode, or by calling getgdesc
n n
at any time. Color indices larger than 2 -1 are clamped to 2 -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 mapcolor.) 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 GOURAUD 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 gconfig is called. SEE ALSO drawmode, getcolor, mapcolor, writemask 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 getgdesc(GDCIFRACT) to determine whether fractional color index Page 1


color(3G)                                                            color(3G)



     iteration is supported.






















































                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026