csLightShaderVarCache Class Reference
Helper to cache names of shader variables relevant to lighting. More...
#include <csgfx/lightsvcache.h>
Public Types | |
enum | DefaultSV { varAmbient = 0, varLightCount, _varCount } |
Other generally useful shader variables that can be obtained. More... | |
enum | LightProperty { lightDiffuse = 0, lightSpecular, lightPosition, lightPositionCamera, lightPositionWorld, lightTransformCamera, lightTransformWorld, lightAttenuation, lightAttenuationTex, lightDirection, lightDirectionCamera, lightDirectionWorld, lightInnerFalloff, lightOuterFalloff, lightType, lightAttenuationMode, _lightCount } |
Properties of lights for which shader variables are known. More... | |
Public Member Functions | |
csLightShaderVarCache () | |
Construct an instance. | |
csStringID | GetDefaultSVId (DefaultSV var) |
Obtain the name for for a lighting-relevant shader variable whose name does not depend on the number of a light. | |
csStringID | GetLightSVId (size_t num, LightProperty prop) |
Obtain the name for for a lighting-relevant shader variable whose name also depends on the number of a light. | |
void | SetStrings (iStringSet *strings) |
Set the string set to query the name identifiers from. |
Detailed Description
Helper to cache names of shader variables relevant to lighting.
Definition at line 36 of file lightsvcache.h.
Member Enumeration Documentation
|
Other generally useful shader variables that can be obtained.
Definition at line 80 of file lightsvcache.h. |
|
Properties of lights for which shader variables are known.
Definition at line 40 of file lightsvcache.h. |
Constructor & Destructor Documentation
|
Construct an instance.
Definition at line 105 of file lightsvcache.h. |
Member Function Documentation
|
Obtain the name for for a lighting-relevant shader variable whose name does not depend on the number of a light. A caching scheme is used to avoid having to re-request a name from the given string set every time one is needed.
|
|
Obtain the name for for a lighting-relevant shader variable whose name also depends on the number of a light. A caching scheme is used to avoid having to re-request a name from the given string set every time one is needed.
Referenced by csLightProperties::csLightProperties(). |
|
Set the string set to query the name identifiers from.
|
The documentation for this class was generated from the following file:
- csgfx/lightsvcache.h
Generated for Crystal Space by doxygen 1.4.6