csShaderVariable Class Reference
Storage class for "shader vars", inheritable variables in the shader system. More...
#include <csgfx/shadervar.h>
Inheritance diagram for csShaderVariable:

Public Types | |
enum | VariableType { INT = 1, FLOAT, COLOR, TEXTURE, RENDERBUFFER, VECTOR2, VECTOR3, VECTOR4, MATRIX, TRANSFORM, ARRAY } |
Data types that can be stored. More... | |
Public Member Functions | |
csShaderVariable (const csShaderVariable &other) | |
csShaderVariable (csStringID name) | |
Construct with name. | |
csShaderVariable () | |
Construct without a name. | |
csShaderVariable * | GetArrayElement (size_t element) |
Get a specific element in an array variable Do not hold on to this for long, since it might change if the array size changes. | |
size_t | GetArraySize () |
Get the number of elements in an array variable. | |
csStringID | GetName () const |
Get the name of the variable. | |
VariableType | GetType () const |
Get type of data stored. | |
bool | GetValue (csReversibleTransform &value) |
Retrieve a csReversibleTransform. | |
bool | GetValue (csMatrix3 &value) |
Retrieve a csMatrix3. | |
bool | GetValue (csVector4 &value) |
Retrieve a csVector4. | |
bool | GetValue (csColor &value) |
Retrieve a csColor. | |
bool | GetValue (csVector3 &value) |
Retrieve a csVector3. | |
bool | GetValue (csVector2 &value) |
Retrieve a csVector2. | |
bool | GetValue (iRenderBuffer *&value) |
Retrieve a iRenderBuffer. | |
bool | GetValue (iTextureWrapper *&value) |
Retrieve a texture wrapper. | |
bool | GetValue (iTextureHandle *&value) |
Retrieve a texture handle. | |
bool | GetValue (csRGBpixel &value) |
Retrieve a color. | |
bool | GetValue (float &value) |
Retrieve a float. | |
bool | GetValue (int &value) |
Retrieve an int. | |
void | SetAccessor (iShaderVariableAccessor *a) |
Set an accessor to use when getting the value. | |
void | SetArrayElement (size_t element, csShaderVariable *variable) |
Set a specific element in an array variable. | |
void | SetArraySize (size_t size) |
Set the number of elements in an array variable. | |
void | SetName (csStringID newName) |
Set the name of the variable. | |
void | SetType (VariableType t) |
Set type (calling this after SetValue will cause undefined behaviour). | |
bool | SetValue (const csReversibleTransform &value) |
Store a csReversibleTransform. | |
bool | SetValue (const csMatrix3 &value) |
Store a csMatrix3. | |
bool | SetValue (const csVector4 &value) |
Store a csVector4. | |
bool | SetValue (const csColor &value) |
Store a csColor. | |
bool | SetValue (const csVector3 &value) |
Store a csVector3. | |
bool | SetValue (const csVector2 &value) |
Store a csVector2. | |
bool | SetValue (iRenderBuffer *value) |
Store a render buffer. | |
bool | SetValue (iTextureWrapper *value) |
Store a texture wrapper. | |
bool | SetValue (iTextureHandle *value) |
Store a texture handle. | |
bool | SetValue (const csRGBpixel &value) |
Store a color. | |
bool | SetValue (float value) |
Store a float. | |
bool | SetValue (int value) |
Store an int. | |
virtual | ~csShaderVariable () |
Detailed Description
Storage class for "shader vars", inheritable variables in the shader system.Shader vars are a primary system to transport information from the engine/meshes/etc. to the renderer.
Definition at line 64 of file shadervar.h.
Member Enumeration Documentation
|
Data types that can be stored. Data storage and retrieval is not strict - data stored as INT, FLOAT, COLOR or any VECTORx data can also be retrieved as any other of those.
Definition at line 72 of file shadervar.h. |
Constructor & Destructor Documentation
|
Construct without a name. SetName() must be called before the variable can be used. |
|
Construct with name.
|
Member Function Documentation
|
Get a specific element in an array variable Do not hold on to this for long, since it might change if the array size changes.
Definition at line 417 of file shadervar.h. |
|
Get the number of elements in an array variable.
Definition at line 404 of file shadervar.h. |
|
Get the name of the variable.
Definition at line 153 of file shadervar.h. |
|
Get type of data stored.
Definition at line 138 of file shadervar.h. |
|
Retrieve a csReversibleTransform.
Definition at line 257 of file shadervar.h. |
|
Retrieve a csMatrix3.
Definition at line 241 of file shadervar.h. |
|
Retrieve a csVector4.
Definition at line 233 of file shadervar.h. |
|
Retrieve a csColor.
Definition at line 225 of file shadervar.h. References csColor::Set(). |
|
Retrieve a csVector3.
Definition at line 217 of file shadervar.h. References csVector3::Set(). |
|
Retrieve a csVector2.
Definition at line 209 of file shadervar.h. References csVector2::Set(). |
|
Retrieve a iRenderBuffer.
Definition at line 201 of file shadervar.h. |
|
Retrieve a texture wrapper.
Definition at line 193 of file shadervar.h. |
|
Retrieve a texture handle.
Definition at line 183 of file shadervar.h. |
|
Retrieve a color.
Definition at line 172 of file shadervar.h. References csRGBpixel::alpha, csRGBpixel::blue, csRGBpixel::green, and csRGBpixel::red. |
|
Retrieve a float.
Definition at line 164 of file shadervar.h. |
|
Retrieve an int.
Definition at line 156 of file shadervar.h. |
|
Set an accessor to use when getting the value.
Definition at line 143 of file shadervar.h. |
|
Set a specific element in an array variable.
Definition at line 429 of file shadervar.h. |
|
Set the number of elements in an array variable.
Definition at line 394 of file shadervar.h. |
|
Set the name of the variable.
Definition at line 150 of file shadervar.h. |
|
Set type (calling this after SetValue will cause undefined behaviour).
Definition at line 140 of file shadervar.h. |
|
Store a csReversibleTransform.
Definition at line 379 of file shadervar.h. |
|
Store a csMatrix3.
Definition at line 364 of file shadervar.h. |
|
Store a csVector4.
Definition at line 355 of file shadervar.h. References csVector4::w, csVector4::x, csVector4::y, and csVector4::z. |
|
Store a csColor.
Definition at line 346 of file shadervar.h. References csColor::blue, csColor::green, and csColor::red. |
|
Store a csVector3.
Definition at line 337 of file shadervar.h. References csVector3::x, csVector3::y, and csVector3::z. |
|
Store a csVector2.
Definition at line 328 of file shadervar.h. References csVector2::x, and csVector2::y. |
|
Store a render buffer.
Definition at line 320 of file shadervar.h. |
|
Store a texture wrapper.
Definition at line 312 of file shadervar.h. |
|
Store a texture handle.
Definition at line 304 of file shadervar.h. |
|
Store a color.
Definition at line 293 of file shadervar.h. References csRGBpixel::alpha, csRGBpixel::blue, csRGBpixel::green, and csRGBpixel::red. |
|
Store a float.
Definition at line 284 of file shadervar.h. |
|
Store an int.
Definition at line 274 of file shadervar.h. |
The documentation for this class was generated from the following file:
- csgfx/shadervar.h
Generated for Crystal Space by doxygen 1.4.4