csLightShaderVarCache Class Reference
Helper to cache names of shader variables relevant to lighting. More...
#include <csgfx/lightsvcache.h>
Public Types | |
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.
- Enumerator:
-
varAmbient "light ambient" varLightCount "light count" _varCount Number of other variables.
Definition at line 80 of file lightsvcache.h.
Properties of lights for which shader variables are known.
- Enumerator:
Definition at line 40 of file lightsvcache.h.
Constructor & Destructor Documentation
csLightShaderVarCache::csLightShaderVarCache | ( | ) | [inline] |
Construct an instance.
- Remarks:
- The instance is only useable after a call to SetStrings().
Definition at line 105 of file lightsvcache.h.
Member Function Documentation
csStringID csLightShaderVarCache::GetDefaultSVId | ( | DefaultSV | var | ) |
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.
- Parameters:
-
var Variable for which a name is to be retrieved.
- Returns:
- Name of the relevant variable, csInvalidStringID in case of an error.
csStringID csLightShaderVarCache::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.
A caching scheme is used to avoid having to re-request a name from the given string set every time one is needed.
- Parameters:
-
num Number of the light that appears in the name prop Light property for which a variable name is to be retrieved.
- Returns:
- Name of the relevant variable, csInvalidStringID in case of an error.
void csLightShaderVarCache::SetStrings | ( | iStringSet * | strings | ) |
Set the string set to query the name identifiers from.
- Remarks:
- Changing the string set will clear the cached names.
The documentation for this class was generated from the following file:
- csgfx/lightsvcache.h
Generated for Crystal Space 1.4.0 by doxygen 1.5.8