Digital Equipment Corporation OpenGL man pages

glColorMaterial.3gl




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

See Also

  glColor, glEnable, glLight, glLightModel, glMaterial




Introduction | Alphabetic | Specification

Last Edited: Fri Dec 6 11:18:03 EST 1996 by AFV
Look here for legal stuff: Legal