_C_ License Applicability. Except to the extent portions of this file are
_C_ made subject to an alternative license as permitted in the SGI Free
_C_ Software License B, Version 1.1 (the "License"), the contents of this
_C_ file are subject only to the provisions of the License. You may not use
_C_ this file except in compliance with the License. You may obtain a copy
_C_ of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
_C_ Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
_C_ 
_C_ http://oss.sgi.com/projects/FreeB
_C_ 
_C_ Note that, as provided in the License, the Software is distributed on an
_C_ "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
_C_ DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
_C_ CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
_C_ PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
_C_ 
_C_ Original Code. The Original Code is: OpenGL Sample Implementation,
_C_ Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
_C_ Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
_C_ Copyright in any portions created by third parties is as indicated
_C_ elsewhere herein. All Rights Reserved.
_C_ 
_C_ Additional Notice Provisions: The application programming interfaces
_C_ established by SGI in conjunction with the Original Code are The
_C_ OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
_C_ April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
_C_ 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
_C_ Window System(R) (Version 1.3), released October 19, 1998. This software
_C_ was created using the OpenGL(R) version 1.2.1 Sample Implementation
_C_ published by SGI, but has not been independently verified as being
_C_ compliant with the OpenGL(R) version 1.2.1 Specification.
_C_
_C_ $Date$ $Revision$
_C_ The first character in this file must be an '_'!
_C_ Anything on a line after _C_ is ignored
_define(_filters,tbl|eqn)_C_
_C_      eqn is automatically replaced with neqn for nroff
_header(ColorMaterial,cause a material color to track the current color)
_names(ColorMaterial)
.SH PARAMETERS
_phead(_param1)
Specifies whether front,
back,
or both front and back material parameters should track the current color.
Accepted values are
_const(FRONT),
_const(BACK),
and _const(FRONT_AND_BACK).
The initial value is _const(FRONT_AND_BACK).
_phead(_param2)
Specifies which of several material parameters track the current color.
Accepted values are
_const(EMISSION),
_const(AMBIENT),
_const(DIFFUSE),
_const(SPECULAR),
and _const(AMBIENT_AND_DIFFUSE).
The initial value is _const(AMBIENT_AND_DIFFUSE).
.SH DESCRIPTION
_cmnd specifies which material parameters track the current color.
When _const(COLOR_MATERIAL) is enabled,
the material parameter or parameters specified by _param2,
of the material or materials specified by _param1,
track the current color at all times.
.P
To enable and disable _const(COLOR_MATERIAL), call
_cmnd(Enable) and _cmnd(Disable) with argument _const(COLOR_MATERIAL).
_const(COLOR_MATERIAL) is initially disabled.
.SH NOTES
_cmnd makes it possible to change a subset of material parameters for each 
vertex using only the _cmnd(Color) command,
without calling _cmnd(Material).
If only such a subset of parameters is to be specified for each
vertex, calling _cmnd is preferable to calling _cmnd(Material).
.P
Call _cmnd before enabling _const(COLOR_MATERIAL).
.P
Calling _cmnd(DrawElements), _cmnd(DrawArrays), or _cmnd(DrawRangeElements)
may leave the current color indeterminate, if the color array is enabled.
If 
_cmnd is enabled while the current color is indeterminate, the 
lighting material state specified by _param1 and _param2 is also indeterminate.
.P
If the GL version is 1.1 or greater, and _const(COLOR_MATERIAL) is
enabled, evaluated color values affect the results of the lighting
equation as if the current color were being modified, but no change is
made to the tracking lighting parameter of the current color.
.SH ERRORS
_const(INVALID_ENUM) is generated if _param1 or _param2 is not an
accepted value.
.P
_const(INVALID_OPERATION) is generated if _cmnd is executed between
the execution of _cmnd(Begin) and the corresponding execution of _cmnd(End).
.SH ASSOCIATED GETS
_cmnd(IsEnabled) with argument _const(COLOR_MATERIAL)
.br
_cmnd(Get) with argument _const(COLOR_MATERIAL_PARAMETER)
.br
_cmnd(Get) with argument _const(COLOR_MATERIAL_FACE)
.SH SEE ALSO
_cmnd(Color),
_cmnd(ColorPointer),
_cmnd(DrawArrays),
_cmnd(DrawElements),
_cmnd(DrawRangeElements),
_cmnd(Enable),
_cmnd(Light),
_cmnd(LightModel),
_cmnd(Material)
