Fig Specular reflection

The GL_SPECULAR parameter affects the color of the specular highlight. Let us see how to implement a specular lighting scheme in openGL. Typically, a real-world object such as a glass bottle has a specular highlight that is whitish. Therefore, if you want to create a realistic effect, set the GL_SPECULAR parameter of the light to a dull white. By default, GL SPECULAR is defined to be (1.0, 1.0, 1.0, 1.0) for GLLIGHTO and (0.0, 0.0, 0.0, 0.0) for any other light.

We can modify Example6_3, by adding a specular component to our GL LIGHTO as follows:

0 0

Post a comment

  • Receive news updates via email from this site