【正文】
ck of polygons ? Set both the ambient and diffuse materials to white for the front of polygons float red[] = {, , , }。 glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, red)。 float white[] = {, , , }。 glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, white)。 Specifying a Material (1/5) ? Reflectivity properties of a material ? face GL_FRONT, GL_BACK, GL_FRONT_AND_BACK ? name GL_DIFFUSE, GL_SPECLAR, GL_AMBIENT, GL_AMBIENT_AND_DIFFUSE, GL_EMISSION, GL_SHININESS glMaterial{if}(GLenum face, GLenum name, TYPE value)。 glMaterial{if}v(GLenum face, GLenum name, TYPE *value)。 Specifying a Material (2/5) Specifying a Material (3/5) Specifying a Material (4/5) Specifying a Material (5/5) Brass Material (1/2) Brass Material (2/2) Red Plastic Material (1/2) Red Plastic Material (2/2) Shininess ? The illusion of shininess ? Caused by the bright spot, known as a specular highlight ? Set using GL_SHININESS ? Is range from 0 to 128 Shininess ? The values of 128 representing an extremely shiny material with a small specular highlight ? 0 representing a material that is not shiny with a very large specular highlight glMaterialf(GL_FRONT_AND_BACK, GL_SHININES