params contains three integer or floating-point values specifying the color indices for
ambient, diffuse, and specular lighting. These three values, and GL_SHININESS, are
the only material values used by the color index mode lighting equation. Refer to the
glLightModel reference page for a discussion of color index lighting.
Notes
The material parameters can be updated at any time. In particular, glMaterial can be
called between a call to glBegin and the corresponding call to glEnd. If only a single
material parameter is to be changed per vertex, however, glColorMaterial is preferred
over glMaterial (see glColorMaterial).
Errors
•
•
Associated Gets
glGetMaterial
See Also
glColorMaterial,
glLight,
glLightModel
Chapter 11
GL_INVALID_ENUM is generated if either face or pname is not an accepted value.
GL_INVALID_VALUE is generated if a specular exponent outside the range [0,128]
is specified.
M
glMaterials
287