![]() |
|Download Files|
![]() ![]() ![]() ![]() ![]() Next: 2.13.4 Lighting State Up: 2.13 Colors and Coloring Previous: 2.13.2 Lighting Parameter Specification
2.13.3 ColorMaterial
It is possible to attach one or more material properties to the current color, so that they continuously track its component values. This behavior is enabled and disabled by calling Enable or Disable with the symbolic value COLOR_MATERIAL. The command that controls which of these modes is selected is
void ColorMaterial ( enum face, enum mode ) ;
face is one of FRONT, BACK, or FRONT_AND_BACK,
indicating whether the front material,
back material,
or both are affected by the current color.
mode is one of EMISSION, AMBIENT,
DIFFUSE, SPECULAR, or AMBIENT_AND_DIFFUSE
and specifies which material property or properties track the current color.
If mode is EMISSION,
AMBIENT, DIFFUSE,
or SPECULAR,
then the value of
ColorMaterial ( FRONT, AMBIENT )
while COLOR_MATERIAL is enabled
sets the front material
![]() ![]() ![]() ![]() ![]() Next: 2.13.4 Lighting State Up: 2.13 Colors and Coloring Previous: 2.13.2 Lighting Parameter Specification David Blythe Sat Mar 29 02:23:21 PST 1997
|