$LastChangedDate: 2009-05-23 19:43:35 -0400 (Sat, 23 May 2009) $

See module_shader.html.

Shader functionality is factored as:
- ShaderFactory singleton   Attaches shader programs to nodes.
                            Caches pre-compiled shaders.
- ShaderModel class         Modifies a 3D model for rendering by shaders.
- BaseLight class           Abstract light/fog methods.
- Light singleton           Interface for light sources (includes fog).
                            These are implemented by shaders and hardware.
- ShaderLight singleton     Private implementation of Light class.
- HwLight singleton         The fixed-functionality light for 3D models incompatible with shaders.
                            Includes hw fog.
- shader_funcs.cc           Low-level shader functions.
- defs.hh                   Names of shaders and uniforms.


All the light classes are derived from BaseLight which is an abstract class.
Most clients should use the Light singleton which forwards method calls
to HwLight and ShaderLight.

This diagram depicts forwarding of methods (it isn't a class hierarchy).

              +-----------+
              |   Light   |
              | interface |
              +---+---+---+
                 /     \
                /       \
     +-------------+  +-----------+  
     | ShaderLight |  |  HwLight  |  
     |   (impl)    |  |   (impl)  |  
     +-------------+  +-----------+  

     Light::SetPosition() +--> ShaderLight::SetPosition()
                          +--> HwLight::SetPosition()
