OGRE-Next
2.3
Object-Oriented Graphics Rendering Engine
|
Uniform parameter class. More...
#include <OgreShaderParameter.h>
Public Member Functions | |
UniformParameter (GpuConstantType type, const String &name, const Semantic &semantic, int index, const Content &content, uint16 variability, size_t size) | |
Class constructor. More... | |
UniformParameter (GpuProgramParameters::AutoConstantType autoType, Real fAutoConstantData, size_t size) | |
Class constructor. More... | |
UniformParameter (GpuProgramParameters::AutoConstantType autoType, Real fAutoConstantData, size_t size, GpuConstantType type) | |
Class constructor. More... | |
UniformParameter (GpuProgramParameters::AutoConstantType autoType, size_t nAutoConstantData, size_t size) | |
Class constructor. More... | |
UniformParameter (GpuProgramParameters::AutoConstantType autoType, size_t nAutoConstantData, size_t size, GpuConstantType type) | |
Class constructor. More... | |
void | bind (GpuProgramParametersSharedPtr paramsPtr) |
Bind this parameter to the corresponding GPU parameter. More... | |
size_t | getAutoConstantIntData () const |
Get auto constant int data of this parameter, in case it is auto constant parameter. More... | |
Real | getAutoConstantRealData () const |
Get auto constant real data of this parameter, in case it is auto constant parameter. More... | |
GpuProgramParameters::AutoConstantType | getAutoConstantType () const |
Return the auto constant type of this parameter. More... | |
Content | getContent () const |
Return the content of this parameter. More... | |
int | getIndex () const |
Get the index of this parameter. More... | |
const String & | getName () const |
Get the name of this parameter. More... | |
const Semantic & | getSemantic () const |
Get the semantic of this parameter. More... | |
size_t | getSize () const |
Returns the number of elements in the parameter (for arrays). More... | |
GpuConstantType | getType () const |
Get the type of this parameter. More... | |
uint16 | getVariability () const |
Return the variability of this parameter. More... | |
bool | isArray () const |
Returns Whether this parameter is an array. More... | |
bool | isAutoConstantIntParameter () const |
Return true if this parameter an auto constant with int data type, false otherwise. More... | |
bool | isAutoConstantParameter () const |
Return true if this parameter is an auto constant parameter, false otherwise. More... | |
bool | isAutoConstantRealParameter () const |
Return true if this parameter an auto constant with real data type, false otherwise. More... | |
virtual bool | isConstParameter () const |
Returns true if this instance is a ConstParameter otherwise false. More... | |
bool | isFloat () const |
Return true if this parameter is a floating point type, false otherwise. More... | |
bool | isSampler () const |
Return true if this parameter is a texture sampler type, false otherwise. More... | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete (void *ptr, void *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info More... | |
void * | operator new (size_t sz, void *ptr) |
placement operator new More... | |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info More... | |
void | setGpuParameter (const ColourValue &val) |
Update the GPU parameter with the given value. More... | |
void | setGpuParameter (const double *val, size_t count, size_t multiple=4) |
Update the GPU parameter with the given value. More... | |
void | setGpuParameter (const float *val, size_t count, size_t multiple=4) |
Update the GPU parameter with the given value. More... | |
void | setGpuParameter (const int *val, size_t count, size_t multiple=4) |
Update the GPU parameter with the given value. More... | |
void | setGpuParameter (const Matrix4 &val) |
Update the GPU parameter with the given value. More... | |
void | setGpuParameter (const Vector2 &val) |
Update the GPU parameter with the given value. More... | |
void | setGpuParameter (const Vector3 &val) |
Update the GPU parameter with the given value. More... | |
void | setGpuParameter (const Vector4 &val) |
Update the GPU parameter with the given value. More... | |
void | setGpuParameter (int val) |
Update the GPU parameter with the given value. More... | |
void | setGpuParameter (Real val) |
Update the GPU parameter with the given value. More... | |
void | setSize (size_t size) |
Sets the number of elements in the parameter (for arrays). More... | |
virtual String | toString () const |
Returns the string representation of this parameter. More... | |
Uniform parameter class.
Allow fast access to GPU parameter updates.
|
inherited |
Enumerator | |
---|---|
SPC_UNKNOWN | Unknown content. |
SPC_POSITION_OBJECT_SPACE | Position in object space. |
SPC_POSITION_WORLD_SPACE | Position in world space. |
SPC_POSITION_VIEW_SPACE | Position in view space. |
SPC_POSITION_PROJECTIVE_SPACE | Position in projective space. |
SPC_POSITION_LIGHT_SPACE0 | Position in light space index 0-7. |
SPC_POSITION_LIGHT_SPACE1 | |
SPC_POSITION_LIGHT_SPACE2 | |
SPC_POSITION_LIGHT_SPACE3 | |
SPC_POSITION_LIGHT_SPACE4 | |
SPC_POSITION_LIGHT_SPACE5 | |
SPC_POSITION_LIGHT_SPACE6 | |
SPC_POSITION_LIGHT_SPACE7 | |
SPC_NORMAL_OBJECT_SPACE | Normal in object space. |
SPC_NORMAL_WORLD_SPACE | Normal in world space. |
SPC_NORMAL_VIEW_SPACE | Normal in view space. |
SPC_NORMAL_TANGENT_SPACE | Normal in tangent space. |
SPC_POSTOCAMERA_OBJECT_SPACE | View vector in object space. |
SPC_POSTOCAMERA_WORLD_SPACE | View vector in world space. |
SPC_POSTOCAMERA_VIEW_SPACE | View vector in view space. |
SPC_POSTOCAMERA_TANGENT_SPACE | View vector in tangent space. |
SPC_POSTOLIGHT_OBJECT_SPACE0 | Light vector in object space index 0-7. |
SPC_POSTOLIGHT_OBJECT_SPACE1 | |
SPC_POSTOLIGHT_OBJECT_SPACE2 | |
SPC_POSTOLIGHT_OBJECT_SPACE3 | |
SPC_POSTOLIGHT_OBJECT_SPACE4 | |
SPC_POSTOLIGHT_OBJECT_SPACE5 | |
SPC_POSTOLIGHT_OBJECT_SPACE6 | |
SPC_POSTOLIGHT_OBJECT_SPACE7 | |
SPC_POSTOLIGHT_WORLD_SPACE0 | Light vector in world space index 0-7. |
SPC_POSTOLIGHT_WORLD_SPACE1 | |
SPC_POSTOLIGHT_WORLD_SPACE2 | |
SPC_POSTOLIGHT_WORLD_SPACE3 | |
SPC_POSTOLIGHT_WORLD_SPACE4 | |
SPC_POSTOLIGHT_WORLD_SPACE5 | |
SPC_POSTOLIGHT_WORLD_SPACE6 | |
SPC_POSTOLIGHT_WORLD_SPACE7 | |
SPC_POSTOLIGHT_VIEW_SPACE0 | Light vector in view space index 0-7. |
SPC_POSTOLIGHT_VIEW_SPACE1 | |
SPC_POSTOLIGHT_VIEW_SPACE2 | |
SPC_POSTOLIGHT_VIEW_SPACE3 | |
SPC_POSTOLIGHT_VIEW_SPACE4 | |
SPC_POSTOLIGHT_VIEW_SPACE5 | |
SPC_POSTOLIGHT_VIEW_SPACE6 | |
SPC_POSTOLIGHT_VIEW_SPACE7 | |
SPC_POSTOLIGHT_TANGENT_SPACE0 | Light vector in tangent space index 0-7. |
SPC_POSTOLIGHT_TANGENT_SPACE1 | |
SPC_POSTOLIGHT_TANGENT_SPACE2 | |
SPC_POSTOLIGHT_TANGENT_SPACE3 | |
SPC_POSTOLIGHT_TANGENT_SPACE4 | |
SPC_POSTOLIGHT_TANGENT_SPACE5 | |
SPC_POSTOLIGHT_TANGENT_SPACE6 | |
SPC_POSTOLIGHT_TANGENT_SPACE7 | |
SPC_LIGHTDIRECTION_OBJECT_SPACE0 | Light direction in object space index 0-7. |
SPC_LIGHTDIRECTION_OBJECT_SPACE1 | |
SPC_LIGHTDIRECTION_OBJECT_SPACE2 | |
SPC_LIGHTDIRECTION_OBJECT_SPACE3 | |
SPC_LIGHTDIRECTION_OBJECT_SPACE4 | |
SPC_LIGHTDIRECTION_OBJECT_SPACE5 | |
SPC_LIGHTDIRECTION_OBJECT_SPACE6 | |
SPC_LIGHTDIRECTION_OBJECT_SPACE7 | |
SPC_LIGHTDIRECTION_WORLD_SPACE0 | Light direction in world space index 0-7. |
SPC_LIGHTDIRECTION_WORLD_SPACE1 | |
SPC_LIGHTDIRECTION_WORLD_SPACE2 | |
SPC_LIGHTDIRECTION_WORLD_SPACE3 | |
SPC_LIGHTDIRECTION_WORLD_SPACE4 | |
SPC_LIGHTDIRECTION_WORLD_SPACE5 | |
SPC_LIGHTDIRECTION_WORLD_SPACE6 | |
SPC_LIGHTDIRECTION_WORLD_SPACE7 | |
SPC_LIGHTDIRECTION_VIEW_SPACE0 | Light direction in view space index 0-7. |
SPC_LIGHTDIRECTION_VIEW_SPACE1 | |
SPC_LIGHTDIRECTION_VIEW_SPACE2 | |
SPC_LIGHTDIRECTION_VIEW_SPACE3 | |
SPC_LIGHTDIRECTION_VIEW_SPACE4 | |
SPC_LIGHTDIRECTION_VIEW_SPACE5 | |
SPC_LIGHTDIRECTION_VIEW_SPACE6 | |
SPC_LIGHTDIRECTION_VIEW_SPACE7 | |
SPC_LIGHTDIRECTION_TANGENT_SPACE0 | Light direction in tangent space index 0-7. |
SPC_LIGHTDIRECTION_TANGENT_SPACE1 | |
SPC_LIGHTDIRECTION_TANGENT_SPACE2 | |
SPC_LIGHTDIRECTION_TANGENT_SPACE3 | |
SPC_LIGHTDIRECTION_TANGENT_SPACE4 | |
SPC_LIGHTDIRECTION_TANGENT_SPACE5 | |
SPC_LIGHTDIRECTION_TANGENT_SPACE6 | |
SPC_LIGHTDIRECTION_TANGENT_SPACE7 | |
SPC_LIGHTPOSITION_OBJECT_SPACE0 | Light position in object space index 0-7. |
SPC_LIGHTPOSITION_OBJECT_SPACE1 | |
SPC_LIGHTPOSITION_OBJECT_SPACE2 | |
SPC_LIGHTPOSITION_OBJECT_SPACE3 | |
SPC_LIGHTPOSITION_OBJECT_SPACE4 | |
SPC_LIGHTPOSITION_OBJECT_SPACE5 | |
SPC_LIGHTPOSITION_OBJECT_SPACE6 | |
SPC_LIGHTPOSITION_OBJECT_SPACE7 | |
SPC_LIGHTPOSITION_WORLD_SPACE0 | Light position in world space index 0-7. |
SPC_LIGHTPOSITION_WORLD_SPACE1 | |
SPC_LIGHTPOSITION_WORLD_SPACE2 | |
SPC_LIGHTPOSITION_WORLD_SPACE3 | |
SPC_LIGHTPOSITION_WORLD_SPACE4 | |
SPC_LIGHTPOSITION_WORLD_SPACE5 | |
SPC_LIGHTPOSITION_WORLD_SPACE6 | |
SPC_LIGHTPOSITION_WORLD_SPACE7 | |
SPC_LIGHTPOSITIONVIEW_SPACE0 | Light position in view space index 0-7. |
SPC_LIGHTPOSITIONVIEW_SPACE1 | |
SPC_LIGHTPOSITIONVIEW_SPACE2 | |
SPC_LIGHTPOSITIONVIEW_SPACE3 | |
SPC_LIGHTPOSITIONVIEW_SPACE4 | |
SPC_LIGHTPOSITIONVIEW_SPACE5 | |
SPC_LIGHTPOSITIONVIEW_SPACE6 | |
SPC_LIGHTPOSITIONVIEW_SPACE7 | |
SPC_LIGHTPOSITION_TANGENT_SPACE | Light position in tangent space index 0-7. |
SPC_BLEND_WEIGHTS | Blending weights. |
SPC_BLEND_INDICES | Blending indices. |
SPC_TANGENT_OBJECT_SPACE | Tangent in object space. |
SPC_TANGENT_WORLD_SPACE | Tangent in world space. |
SPC_TANGENT_VIEW_SPACE | Tangent in view space. |
SPC_TANGENT_TANGENT_SPACE | Tangent in tangent space. |
SPC_BINORMAL_OBJECT_SPACE | Binormal in object space. |
SPC_BINORMAL_WORLD_SPACE | Binormal in world space. |
SPC_BINORMAL_VIEW_SPACE | Binormal in view space. |
SPC_BINORMAL_TANGENT_SPACE | Binormal in tangent space. |
SPC_COLOR_DIFFUSE | Diffuse color. |
SPC_COLOR_SPECULAR | Specular color. |
SPC_DEPTH_OBJECT_SPACE | Depth in object space. |
SPC_DEPTH_WORLD_SPACE | Depth in world space. |
SPC_DEPTH_VIEW_SPACE | Depth in view space. |
SPC_DEPTH_PROJECTIVE_SPACE | Depth in projective space. |
SPC_TEXTURE_COORDINATE0 | Texture coordinate set index 0-7. |
SPC_TEXTURE_COORDINATE1 | |
SPC_TEXTURE_COORDINATE2 | |
SPC_TEXTURE_COORDINATE3 | |
SPC_TEXTURE_COORDINATE4 | |
SPC_TEXTURE_COORDINATE5 | |
SPC_TEXTURE_COORDINATE6 | |
SPC_TEXTURE_COORDINATE7 | |
SPC_TEXTURE_ARRAY | |
SPC_CUSTOM_CONTENT_BEGIN | Reserved custom content range to be used by user custom shader extensions. |
SPC_CUSTOM_CONTENT_END |
|
inherited |
Ogre::RTShader::UniformParameter::UniformParameter | ( | GpuConstantType | type, |
const String & | name, | ||
const Semantic & | semantic, | ||
int | index, | ||
const Content & | content, | ||
uint16 | variability, | ||
size_t | size | ||
) |
Class constructor.
type | The type of this parameter. |
name | The name of this parameter. |
semantic | The semantic of this parameter. |
index | The index of this parameter. |
content | The content of this parameter. |
variability | How this parameter varies (bitwise combination of GpuProgramVariability). |
size | number of elements in the parameter. |
Ogre::RTShader::UniformParameter::UniformParameter | ( | GpuProgramParameters::AutoConstantType | autoType, |
Real | fAutoConstantData, | ||
size_t | size | ||
) |
Class constructor.
autoType | The auto type of this parameter. |
fAutoConstantData | The real data for this auto constant parameter. |
size | number of elements in the parameter. |
Ogre::RTShader::UniformParameter::UniformParameter | ( | GpuProgramParameters::AutoConstantType | autoType, |
Real | fAutoConstantData, | ||
size_t | size, | ||
GpuConstantType | type | ||
) |
Class constructor.
autoType | The auto type of this parameter. |
fAutoConstantData | The real data for this auto constant parameter. |
size | number of elements in the parameter. |
type | The desired data type of this auto constant parameter. |
Ogre::RTShader::UniformParameter::UniformParameter | ( | GpuProgramParameters::AutoConstantType | autoType, |
size_t | nAutoConstantData, | ||
size_t | size | ||
) |
Class constructor.
autoType | The auto type of this parameter. |
nAutoConstantData | The int data for this auto constant parameter. |
size | number of elements in the parameter. |
Ogre::RTShader::UniformParameter::UniformParameter | ( | GpuProgramParameters::AutoConstantType | autoType, |
size_t | nAutoConstantData, | ||
size_t | size, | ||
GpuConstantType | type | ||
) |
Class constructor.
autoType | The auto type of this parameter. |
nAutoConstantData | The int data for this auto constant parameter. |
size | number of elements in the parameter. |
type | The desired data type of this auto constant parameter. |
void Ogre::RTShader::UniformParameter::bind | ( | GpuProgramParametersSharedPtr | paramsPtr | ) |
Bind this parameter to the corresponding GPU parameter.
|
inline |
Get auto constant int data of this parameter, in case it is auto constant parameter.
|
inline |
Get auto constant real data of this parameter, in case it is auto constant parameter.
|
inline |
Return the auto constant type of this parameter.
|
inlineinherited |
Return the content of this parameter.
|
inlineinherited |
Get the index of this parameter.
|
inlineinherited |
Get the name of this parameter.
|
inlineinherited |
Get the semantic of this parameter.
|
inlineinherited |
Returns the number of elements in the parameter (for arrays).
|
inlineinherited |
Get the type of this parameter.
|
inline |
Return the variability of this parameter.
|
inlineinherited |
Returns Whether this parameter is an array.
|
inline |
Return true if this parameter an auto constant with int data type, false otherwise.
|
inline |
Return true if this parameter is an auto constant parameter, false otherwise.
|
inline |
Return true if this parameter an auto constant with real data type, false otherwise.
|
inlinevirtualinherited |
Returns true if this instance is a ConstParameter otherwise false.
Reimplemented in Ogre::RTShader::ConstParameter< valueType >.
bool Ogre::RTShader::UniformParameter::isFloat | ( | ) | const |
Return true if this parameter is a floating point type, false otherwise.
bool Ogre::RTShader::UniformParameter::isSampler | ( | ) | const |
Return true if this parameter is a texture sampler type, false otherwise.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
|
inlineinherited |
placement operator new
|
inlineinherited |
|
inlineinherited |
array operator new, with debug line info
|
inline |
Update the GPU parameter with the given value.
|
inline |
Update the GPU parameter with the given value.
|
inline |
Update the GPU parameter with the given value.
|
inline |
Update the GPU parameter with the given value.
|
inline |
Update the GPU parameter with the given value.
|
inline |
Update the GPU parameter with the given value.
References Ogre::Vector2::ptr().
|
inline |
Update the GPU parameter with the given value.
|
inline |
Update the GPU parameter with the given value.
|
inline |
Update the GPU parameter with the given value.
|
inline |
Update the GPU parameter with the given value.
|
inlineinherited |
Sets the number of elements in the parameter (for arrays).
|
inlinevirtualinherited |
Returns the string representation of this parameter.
Reimplemented in Ogre::RTShader::ConstParameter< valueType >.
size_t Ogre::RTShader::UniformParameter::mAutoConstantIntData |
Real Ogre::RTShader::UniformParameter::mAutoConstantRealData |