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

  man pages->IRIX man pages -> standard/cmode (3)              


cmode(3G)							     cmode(3G)

NAME    [Toc]    [Back]

     cmode - sets color	map mode as the	current	mode.

C SPECIFICATION    [Toc]    [Back]

     void cmode()

PARAMETERS    [Toc]    [Back]


DESCRIPTION    [Toc]    [Back]

     cmode instructs the system	to treat color as a 1-component	entity in the
     currently active drawmode.	 The single color component is used as an
     index into	a table	of RGB color values called the color map.  Because
     color map mode is the default value for all GL framebuffers, it can be
     called in any of the framebuffer drawmodes	(NORMALDRAW, PUPDRAW,
     OVERDRAW, and UNDERDRAW).	To return the normal framebuffer to color map
     mode, however, you	must call cmode	while in drawmode NORMALDRAW.  You
     must call gconfig for cmode to take effect.

     While in color map	mode, a	framebuffer is configured to store a single
     color index at each pixel location.  The framebuffer is displayed by
     continually translating color indices into	RGB triples using the
     framebuffer's color map, a	table of index-to-RGB mappings.	 The red,
     green, and	blue components	stored in the color map	are used (after
     correction	for monitor non-linearity) to directly control the color guns
     of	the monitor.  Colors and writemasks must be specified using color
     map-compatible commands such as color, colorf, and	writemask.

     Many advanced rendering features, such as texture mapping,	polygon
     antialiasing, and fog, are	available only in RGB mode.  Color map mode
     lighting, while functional, is substantially less robust than its RGB
     mode counterpart.

     Since cmode is the	default, you do	not have to call it unless the normal
     framebuffer was previously	set to RGB mode.

SEE ALSO    [Toc]    [Back]

     color, drawmode, gconfig, getdisplaymode, getgdesc, multimap, onemap,
     RGBmode, writemask

NOTE    [Toc]    [Back]

     Color map mode is available in all	framebuffers of	all hardware
     configurations.  getgdesc can be used to determine	how many bitplanes in
     each of the normal, popup,	overlay, and underlay framebuffers are
     available in both single and double buffered color	map mode.

     This routine is available only in immediate mode.

									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
rgbcolor IRIX sets the current color in RGB mode
color IRIX sets the color index in the current draw mode
getcmmode IRIX returns the current color map mode
rgbmode IRIX sets a rendering and display mode that bypasses the color map
doublebuffer IRIX sets the display mode to double buffer mode
mmode IRIX sets the current matrix mode
setmap IRIX selects one of the small color maps provided by multimap mode
XmTextFieldSetAddMode IRIX A TextField function that sets the state of Add Mode
XmTextFieldSetAddMode Tru64 A TextField function that sets the state of Add Mode
XmTextSetAddMode IRIX A Text function that sets the state of Add Mode
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service