Chapter 5. Lighting
After reading this chapter, you’ll be able to do the following:
• Understand how real-world lighting conditions are approximated by OpenGL
• Render illuminated objects by defining light source, material, and lighting model properties
• Define the material properties of the objects being illuminated
• Manipulate the matrix stack to control the positions of light sources
In OpenGL Version 3.1, many of the techniques and functions described in this chapter were removed through deprecation. The concepts are still relevant, but computing colors through lighting must be done in either a vertex or fragment shader. These topics are briefly described in Chapter 15, and fully explained in the companion ...