List of the currently active lights The number of the light is equal to it's array index. (i.e. The light at index 0 is GL_LIGHT0)
static void EnableNormalize |
( |
bool |
enableNormalize | ) |
|
|
static |
Set whether or not GL_NORMALIZE is enabled
- Parameters
-
enableNormalize | Set GL_NORMALIZE to true or false |
static bool EnableNormalize |
( |
| ) |
|
|
static |
Get the state of whether GL_NORMALIZE is enabled
- Returns
- Whether or not GL_NORMALIZE is enabled
unsigned int GetActiveLightsBitMask |
( |
void |
| ) |
|
Get a bitmask of the active lights
- Returns
- An unsigned integer with each bit representing a light turned on/off
bool* GetActiveLightsMask |
( |
void |
| ) |
|
Get a boolean mask of the active lights
- Returns
- A boolean array with a bitmask of the currently active lights
Get the current lighting state
- Returns
- The current lighting state
unsigned int GetNumActiveLights |
( |
void |
| ) |
|
Get the number of active lights. Really is the max index(+1) of lights that you need to cycle through to have taken all of them into account (in case of holes in the list created by an outside party).
- Returns
- An integer representing the (max) number of currently active lights
static unsigned int GlMaxLights |
( |
| ) |
|
|
inlinestatic |
- Returns
- The value of GL_MAX_LIGHTS
void InitializeStateFromOpenGL |
( |
void |
| ) |
|
Clear the lighting stack, create GlsLightSource objects based on the current OpenGL lighting state and store them as the current state.
void PopLightingState |
( |
| ) |
|
Push the current lighting state off the stack
void PushLightingState |
( |
| ) |
|
Push the current lighting state onto the stack
Flags the need to reapply the lights. This may be necessary for special cases where the OpenGL matrices have changed during a traversel. This can happen when drawing multiple views of the same geometry.
void RestoreOpenGLState |
( |
void |
| ) |
|
Set the current lighting state to a new state
- Parameters
-
newState | The new lighting state |
void SetupLighting |
( |
GlsEyePoint * |
relativeToEyepoint = NULL | ) |
|
Set OpenGL lighting state to match the current state. If relativeToEyepoint is set, the light will be applied using the modelview matrix calculated from the eyepoint to the light.
friend class GlobalLightMgrThreadMap |
|
friend |
helper class for maintaining one global light mgr per calling thread
The value of glGetIntegerv(GL_MAX_LIGHTS);
The current OpenGL lighting state
Store temporary light source pointers (only used in InitializeStateFromOpenGL)
As each component draws it will push it's lighting state on the stack
This will become the _currentOpenglState when a lit object draws
The documentation for this class was generated from the following file: