GLAMBIENTANDDIFFUSE
GL_AMBIENT_AND_DIFFUSE is an OpenGL color-material option used with the fixed-function lighting model to map the current color to both the ambient and diffuse material properties of the surfaces being drawn. When GL_COLOR_MATERIAL is enabled and GL_AMBIENT_AND_DIFFUSE is selected, calls to glColorMaterial or glColor* affect both ambient and diffuse reflectance for the specified faces, so the material’s ambient and diffuse terms share the same value.
In practice, this means the ambient term of the lighting equation, which represents a constant illumination,
Usage involves enabling GL_COLOR_MATERIAL, choosing the affected faces (such as GL_FRONT or GL_FRONT_AND_BACK), and selecting GL_AMBIENT_AND_DIFFUSE
Limitations include its association with the fixed-function pipeline, which is deprecated in modern OpenGL core profiles.