【文章內(nèi)容簡介】
S, 128)。 Emissive Materials ? Simulate that emit light ? Such as an area light or anything that glows ? It won’t illuminate nearby objects ? Cause the object to appear brighter Emissive Materials ? Use GL_EMISSION ? By default, the emissive term is (, , , ) // use a dark gray color GLfloat emissiveColor[] = {, , , }。 // set the emissive term for both the front and back face glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, emissiveColor)。 Color Tracking ? Another way to set material properties is by what is called color tracking ? Set material properties with calls to the glColor() Color Tracking ? Passing the GL_COLOR_MATERIAL parameter to the glEnable() function ? Use glColorMaterial() function to specify which material parameters will be affected by calls to glColor Color Tracking ? A sample ? Set diffuse property of the fronts of polygons to track the current color glEnable(GL_COLOR_MATERIAL)。 glColorMaterial(GL_FRONT, GL_DIFFUSE)。 glColor3f(, , )。 glBegin(GL_TRIANGLES)。 // draw triangles glEnd()。 Normals ? Normals are vectors that are perpendicular to a surface ? The orientation of that surface ? Specify on a pervertex basis Normals ? Norma