#include <light.h>
Public Types | |
enum | { MAX_LIGHTS = 8 } |
Symbolic constant for maximum number of lights available in a ILightingState object. More... | |
Public Member Functions | |
virtual | ~ILightingState (void) |
Destructor. | |
virtual void | setShowLights (bool enable)=0 |
Writes the show-lights flag. | |
virtual void | setLight (int index, const CLight &l)=0 |
Sets the light source parameters of an indexed light. | |
virtual void | setMaterial (const CMaterial &m)=0 |
Sets the current material parameters. | |
virtual void | setLightingEnabled (bool enable)=0 |
Writes lighting-enables state bit. | |
virtual bool | getLight (int index, CLight &l) const =0 |
Get parameters of an indexed light source. | |
virtual void | getMaterial (CMaterial &m) const =0 |
Get the current material parameters. | |
virtual bool | getLightingEnabled (void) const =0 |
Reads the lighting-enabled state bit. |
This interface is responsible for storing lighting specific state, like the lighting-enabled flag, light sources and the current material. It basically represents what is defined in the OpenGL specification.
The show-lights flag defines, wether the light sources should be drawn as spheres in the diffuse color of each light source.
The maximum amount of light sources available can be read from the symbolic constant MAX_LIGHTS defined in this interface.
This interface implicitly controls how lights and material are processed. See CLight for additional documentation about light state processing.
anonymous enum |
Symbolic constant for maximum number of lights available in a ILightingState object.
The value 8 is the minimum value allowed for the implementation specific constant GL_MAX_LIGHTS.
virtual ILightingState::~ILightingState | ( | void | ) | [inline, virtual] |
Destructor.
virtual void ILightingState::setShowLights | ( | bool | enable | ) | [pure virtual] |
Writes the show-lights flag.
enable | The show-lights flag. |
Implemented in CLightingState.
virtual void ILightingState::setLight | ( | int | index, | |
const CLight & | l | |||
) | [pure virtual] |
Sets the light source parameters of an indexed light.
index | Light source index, must be in range [0,MAX_LIGHTS-1]. | |
l | Light source parameters. |
Implemented in CLightingState.
virtual void ILightingState::setMaterial | ( | const CMaterial & | m | ) | [pure virtual] |
Sets the current material parameters.
m | Material parameters. |
Implemented in CLightingState.
virtual void ILightingState::setLightingEnabled | ( | bool | enable | ) | [pure virtual] |
Writes lighting-enables state bit.
This represents the GL_LIGHTING state bit of OpenGL. The initial state is false.
enable | The lighting-enabled state bit. |
Implemented in CLightingState.
virtual bool ILightingState::getLight | ( | int | index, | |
CLight & | l | |||
) | const [pure virtual] |
Get parameters of an indexed light source.
The call fails, if the light source index is out of range. In that case, results are undefined.
index | Light source index, must be in range [0,MAX_LIGHTS-1]. | |
l | Buffer that is filled with ligh source parameters. |
Implemented in CLightingState.
virtual void ILightingState::getMaterial | ( | CMaterial & | m | ) | const [pure virtual] |
Get the current material parameters.
m | Buffer that is filled with material parameters. |
Implemented in CLightingState.
virtual bool ILightingState::getLightingEnabled | ( | void | ) | const [pure virtual] |
Reads the lighting-enabled state bit.
Implemented in CLightingState.