*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/color (3)              
Title
Content
Arch
Section
 

Contents


color(3G)							     color(3G)


NAME    [Toc]    [Back]

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

C SPECIFICATION    [Toc]    [Back]

     void color(c)
     Colorindex	c;

     void colorf(c)
     float c;

PARAMETERS    [Toc]    [Back]

     c	 expects an index into the current color map.

DESCRIPTION    [Toc]    [Back]

     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.

     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 getplanes while in	the desired draw mode, or by calling getgdesc
     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 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    [Toc]    [Back]

      
      
     drawmode, getcolor, mapcolor, writemask

NOTE    [Toc]    [Back]

     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(GD_CIFRACT) to determine whether fractional color	index



									Page 1






color(3G)							     color(3G)



     iteration is supported.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
cmode IRIX sets color map mode as the current mode.
rgbcolor IRIX sets the current color in RGB mode
glIndexfv Tru64 set the current color index
glindex IRIX set the current color index
glIndexf Tru64 set the current color index
glIndexdv Tru64 set the current color index
glIndexd Tru64 set the current color index
glIndex Tru64 set the current color index
glIndexsv Tru64 set the current color index
glIndexiv Tru64 set the current color index
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service