glcolormaterial
- Man Page
glColorMaterial(3G) OpenGL Reference glColorMaterial(3G)
NAME
glColorMaterial - cause a material color to track the current color
C SPECIFICATION
void glColorMaterial( GLenum face,
GLenum mode )
PARAMETERS
face Specifies whether front, back, or both front and back material
parameters should track the current color. Accepted values are
GL_FRONT, GL_BACK, and GL_FRONT_AND_BACK. The default value is
GL_FRONT_AND_BACK.
mode Specifies which of several material parameters track the current
color. Accepted values are GL_EMISSION, GL_AMBIENT, GL_DIFFUSE,
GL_SPECULAR, and GL_AMBIENT_AND_DIFFUSE. The default value is
GL_AMBIENT_AND_DIFFUSE.
DESCRIPTION
glColorMaterial specifies which material parameters track the current
color. When GL_COLOR_MATERIAL is enabled, the material parameter or
parameters specified by mode, of the material or materials specified by
face, track the current color at all times. GL_COLOR_MATERIAL is
enabled and disabled using the commands glEnable and glDisable, called
with GL_COLOR_MATERIAL as their argument. By default, it is disabled.
NOTES
glColorMaterial allows a subset of material parameters to be changed for
each vertex using only the glColor command, without calling glMaterial.
If only such a subset of parameters is to be specified for each vertex,
glColorMaterial is preferred over calling glMaterial.
Call glColorMaterial before enabling the GL_COLOR_MATERIAL.
ERRORS
GL_INVALID_ENUM is generated if face or mode is not an accepted value.
GL_INVALID_OPERATION is generated if glColorMaterial is executed between
the execution of glBegin and the corresponding execution of glEnd.
ASSOCIATED GETS
glIsEnabled with argument GL_COLOR_MATERIAL
glGet with argument GL_COLOR_MATERIAL_PARAMETER
glGet with argument GL_COLOR_MATERIAL_FACE
Page 1
glColorMaterial(3G) OpenGL Reference glColorMaterial(3G)
MACHINE DEPENDENCIES
On RealityEngine, RealityEngine2, and VTX systems, GL_AMBIENT_AND_DIFFUSE
mode does not work correctly.
SEE ALSO
glColor, glEnable, glLight, glLightModel, glMaterial
Page 2