Stores the id of the current light. More...
#include <Inventor/elements/SoGLLightIdElement.h>
Public Member Functions | |
virtual void | push (SoState *state) |
virtual void | pop (SoState *state, const SoElement *prevTopElement) |
virtual void | print (FILE *fp) const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static int | getClassStackIndex () |
static int | increment (SoState *state) |
static int | increment (SoState *state, SoNode *) |
static int | get (SoState *state) |
static int | getDefault () |
static int | getMaxGLSources () |
Stores the id of the current light.
This element stores the id of the current light. The first light active in a scene has id 0, the next has 1, and so on. This element can be used to determine how many lights are currently active. The initial value of this element is -1 to indicate that there are no lights active.
NOTE: This class does not exist in Open Inventor 10.0 and later.Note that even though the effects of this element accumulate (each light source increments the id), it is derived from SoInt32Element. This is because each call to increment() effectively does a "get" of the current top instance, so caching knows about the dependency of each instance on the previous one.
SoDirectionalLight, SoPointLight, SoSpotLight, SoVRMLDirectionalLight, SoVRMLPointLight, SoVRMLSpotLight
static int SoGLLightIdElement::get | ( | SoState * | state | ) | [inline, static] |
Returns current light id from the state.
static int SoGLLightIdElement::getClassStackIndex | ( | ) | [static] |
Returns the stack id for this element.
Reimplemented from SoInt32Element.
static SoType SoGLLightIdElement::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoInt32Element.
static int SoGLLightIdElement::getDefault | ( | ) | [inline, static] |
Returns the default light id.
static int SoGLLightIdElement::getMaxGLSources | ( | ) | [static] |
Returns the maximum number of concurrent light sources supported by GL implementation.
Increments the current light id.
This should be called when a light source becomes active. This returns the new id, or -1 if the maximum number of GL light sources has been exceeded. Otherwise, enables light source.
static int SoGLLightIdElement::increment | ( | SoState * | state | ) | [static] |
Increments the current light id.
This should be called when a light source becomes active. This returns the new id, or -1 if the maximum number of GL light sources has been exceeded. Otherwise, enables light source.
virtual void SoGLLightIdElement::pop | ( | SoState * | state, | |
const SoElement * | prevTopElement | |||
) | [virtual] |
Overrides pop() method so side effects can occur in GL.
virtual void SoGLLightIdElement::print | ( | FILE * | fp | ) | const [virtual] |
Prints element (for debugging).
Reimplemented from SoInt32Element.
virtual void SoGLLightIdElement::push | ( | SoState * | state | ) | [virtual] |