csShaderVariable Class Reference
[3D]
Storage class for "shader vars", inheritable variables in the shader system.
More...
#include <csgfx/shadervar.h>
List of all members.
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 73 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 or any VECTORx data can also be retrieved as any other of those.
- Enumerator:
-
UNKNOWN |
No value was yet set, hence the type is unknown. |
INT |
Integer. |
FLOAT |
Float. |
TEXTURE |
Texture. |
RENDERBUFFER |
Renderbuffer. |
VECTOR2 |
Vector with 2 components. |
VECTOR3 |
Vector with 3 components. |
VECTOR4 |
Vector with 4 components. |
MATRIX |
Matrix. |
TRANSFORM |
Transform. |
ARRAY |
Array. |
COLOR |
Color.
- Deprecated:
- Same as VECTOR4.
|
Definition at line 81 of file shadervar.h.
Constructor & Destructor Documentation
csShaderVariable::csShaderVariable |
( |
|
) |
|
Construct without a name.
SetName() must be called before the variable can be used.
csShaderVariable::csShaderVariable |
( |
csStringID |
name |
) |
|
Member Function Documentation
intptr_t csShaderVariable::GetAccessorData |
( |
|
) |
const [inline] |
Get the extra accessor data.
Definition at line 167 of file shadervar.h.
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 533 of file shadervar.h.
size_t csShaderVariable::GetArraySize |
( |
|
) |
[inline] |
Get the number of elements in an array variable.
Definition at line 523 of file shadervar.h.
csStringID csShaderVariable::GetName |
( |
|
) |
const [inline] |
Get the name of the variable.
Definition at line 161 of file shadervar.h.
bool csShaderVariable::GetValue |
( |
csMatrix3 & |
value |
) |
[inline] |
bool csShaderVariable::GetValue |
( |
csQuaternion & |
value |
) |
[inline] |
bool csShaderVariable::GetValue |
( |
csVector4 & |
value |
) |
[inline] |
bool csShaderVariable::GetValue |
( |
csColor & |
value |
) |
[inline] |
bool csShaderVariable::GetValue |
( |
csVector3 & |
value |
) |
[inline] |
bool csShaderVariable::GetValue |
( |
csVector2 & |
value |
) |
[inline] |
bool csShaderVariable::GetValue |
( |
iRenderBuffer *& |
value |
) |
[inline] |
Retrieve a texture wrapper.
Definition at line 232 of file shadervar.h.
Retrieve a texture handle.
Definition at line 210 of file shadervar.h.
bool csShaderVariable::GetValue |
( |
csRGBpixel & |
value |
) |
[inline] |
bool csShaderVariable::GetValue |
( |
float & |
value |
) |
[inline] |
bool csShaderVariable::GetValue |
( |
int & |
value |
) |
[inline] |
Set an accessor to use when getting the value.
Definition at line 144 of file shadervar.h.
void csShaderVariable::SetArrayElement |
( |
size_t |
element, |
|
|
csShaderVariable * |
variable | |
|
) |
| | [inline] |
Set a specific element in an array variable.
Definition at line 545 of file shadervar.h.
void csShaderVariable::SetArraySize |
( |
size_t |
size |
) |
[inline] |
Set the number of elements in an array variable.
Definition at line 514 of file shadervar.h.
void csShaderVariable::SetName |
( |
csStringID |
newName |
) |
[inline] |
Set the name of the variable.
- Warning:
- Changing the name of a variable while it's in use can cause unexpected behaviour.
Definition at line 155 of file shadervar.h.
Set type (calling this after SetValue will cause undefined behaviour).
Definition at line 138 of file shadervar.h.
bool csShaderVariable::SetValue |
( |
const csMatrix3 & |
value |
) |
[inline] |
bool csShaderVariable::SetValue |
( |
const csVector4 & |
value |
) |
[inline] |
bool csShaderVariable::SetValue |
( |
const csColor4 & |
value |
) |
[inline] |
bool csShaderVariable::SetValue |
( |
const csColor & |
value |
) |
[inline] |
bool csShaderVariable::SetValue |
( |
const csVector3 & |
value |
) |
[inline] |
bool csShaderVariable::SetValue |
( |
const csVector2 & |
value |
) |
[inline] |
bool csShaderVariable::SetValue |
( |
iRenderBuffer * |
value |
) |
[inline] |
bool csShaderVariable::SetValue |
( |
const csRGBpixel & |
value |
) |
[inline] |
bool csShaderVariable::SetValue |
( |
float |
value |
) |
[inline] |
bool csShaderVariable::SetValue |
( |
int |
value |
) |
[inline] |
The documentation for this class was generated from the following file: