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

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

Contents


c(3G)									 c(3G)


NAME    [Toc]    [Back]

     c3f, c3i, c3s, c4f, c4i, c4s - sets the RGB (or RGBA) values for the
     current color vector

C SPECIFICATION    [Toc]    [Back]

     void c3s(cv)
     short cv[3];

     void c3i(cv)
     long cv[3];

     void c3f(cv)
     float cv[3];

     void c4s(cv)
     short cv[4];

     void c4i(cv)
     long cv[4];

     void c4f(cv)
     float cv[4];

     The subroutines above are functionally the	same but declare their
     parameters	differently.

PARAMETER    [Toc]    [Back]

     cv	  For the c4 routines, this parameter expects a	four element array
	  containing RGBA (red,	green, blue, and alpha)	values.	 If you	use
	  the c3 routines, this	parameter expects a three element array
	  containing RGB values.

	  Array	components 0, 1, 2, and	3 are red, green, blue,	and alpha,
	  respectively.	Floating point RGBA values range from 0.0 through 1.0.
	  Integer RGBA values range from 0 through 255.	 Values	that exceed
	  the upper limit are clamped to it.  Values that exceed the lower
	  limit	are not	clamped, and therefore result in unpredictable
	  operation.

DESCRIPTION    [Toc]    [Back]

     c4	sets the red, green, blue, and alpha color components of the currently
     active GL framebuffer, one	of normal, popup, overlay, or underlay (see
     drawmode).	 c3 sets red, green, and blue to the specified values, and
     sets alpha	to the maximum value.  The current framebuffer must be in RGB
     mode (see RGBmode)	for the	c command to be	applicable.  Most drawing
     commands copy the current RGBA color components into the color bitplanes
     of	the current framebuffer.  Color	components are retained	in each	draw
     mode, so when a draw mode is re-entered, red, green, blue,	and alpha are
     reset to the last values specified	in that	draw mode.






									Page 1






c(3G)									 c(3G)



     Integer color component values range from 0, specifying no	intensity,
     through 255, specifying maximum intensity.	 Floating point	color
     component values range from 0.0, specifying no intensity, through 1.0,
     specifying	maximum	intensity.

     It	is an error to call c while the	current	framebuffer is in color	map
     mode.

     The color components of all framebuffers in RGB mode are set to zero when
     gconfig is	called.

SEE ALSO    [Toc]    [Back]

      
      
     cpack, drawmode, lmcolor, gRGBcolor

NOTE    [Toc]    [Back]

     These routines can	also be	used to	modify the current material while
     lighting is active	(see lmcolor).	Note that clamping to 1.0 is disabled
     in	this case.

     Because only the normal framebuffer currently supports RGB	mode, c	should
     be	called only while draw mode is NORMALDRAW.  Use	getgdesc to determine
     whether RGB mode is available in draw mode	NORMALDRAW.

BUGS    [Toc]    [Back]

     On	the IRIS-4D/120GTX and IRIS-4D/140GTX, there is	problem	with the
     graphics DMA hardware that	can cause data to be sent to the hardware
     after the subroutine call has returned.  If the data is modified
     immediately after the subroutine call, the	modified data may get sent
     down.  To avoid this, don't modify	the data until after another n,	v, or
     c call has	been made.

     This is an	example	of the bug:

	  vertex[2] = 1.0;
	  v3f(vertex);	 /* 4D/1x0 GTX hardware	may receive 3.0	for the	z value	*/
	  vertex[2] = 3.0;
	  v3f(vertex);


     This is one way to	work around the	problem:

	  vertexA[2] = 1.0;
	  v3f(vertexA);
	  vertexB[2] = 3.0;
	  v3f(vertexB);


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
DXmColorMixSetNewColor Tru64 Sets the new color red, green, and blue values in the color mixing widget.
DXmColorMixGetNewColor Tru64 Retrieves (returns) the color mixing widget's current new color red, green, and blue values.
grgbcolor IRIX gets the current RGB color values
cpack IRIX specifies RGBA color with a single packed 32-bit integer
rgbcolor IRIX sets the current color in RGB mode
color IRIX sets the color index in the current draw mode
cmode IRIX sets color map mode as the current mode.
SgColorChooserSetStoredColor IRIX A ColorChooser function that sets the color of the ColorChooser's stored color swatch
glColorMaterial Tru64 cause a material color to track the current color
glcolormaterial IRIX cause a material color to track the current color
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service