GLCOLORMATERIAL
GL_COLOR_MATERIAL is a feature of OpenGL's fixed-function pipeline that links the current color state to material properties used in lighting calculations. When enabled, colors specified with glColor* calls can automatically update certain material attributes of the drawn geometry, reducing the need to call glMaterial for each property.
To use GL_COLOR_MATERIAL, the state is enabled with glEnable(GL_COLOR_MATERIAL) and configured with glColorMaterial(face, mode). The face
When GL_COLOR_MATERIAL is active, subsequent glColor calls set the specified material properties for the chosen faces,
GL_COLOR_MATERIAL remains part of the compatibility profile and is associated with the fixed-function pipeline. In modern