OpenGL Distilled
4.7. More Information
For information on OpenGL lighting topics not covered in this chapter (such as spotlights, attenuation, lighting model parameters, emissive and ambient light, precise details of OpenGL light equations, and lighting in color index mode), see the following:
Because OpenGL applies textures after performing lighting calculations, geometry that is both lit and textured requires special treatment. Chapter 6, "Texture Mapping," discusses techniques for applying textures that preserve OpenGL lighting effects. OpenGL lighting creates shading effects but doesn't create shadows from one surface on to another. You can implement one of many algorithms in your OpenGL application to create shadows. For information on creating shadow effects, see the following:
The OpenGL® Distilled Web site has two examples that demonstrate shadow techniques and other examples that also employ lighting. The OpenGL Web site at http://www.opengl.org also has several coding resources online, including lighting and shadow example code. |
Категории