OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::ShaderParams::Param Struct Reference

#include <OgreShaderParams.h>

Public Member Functions

template<typename T >
getManualValue () const
 See other overload. More...
 
template<typename T >
void getManualValue (T &value) const
 Returns the value. More...
 
void setManualValue (const float *value, uint32 numValues)
 
void setManualValue (const int32 *value, uint32 numValues)
 
void setManualValue (const Matrix3 &value)
 
void setManualValue (const Matrix4 &value)
 
void setManualValue (const uint32 *value, uint32 numValues)
 
void setManualValue (const Vector2 &value)
 
void setManualValue (const Vector3 &value)
 
void setManualValue (const Vector4 &value)
 
void setManualValue (float value)
 Shortcut for setting the given value without dealing with mp manually. More...
 
void setManualValue (int32 value)
 
template<typename T >
void setManualValue (T value, uint32 numValues, ElementType elementType)
 
void setManualValue (uint32 value)
 
void setManualValueEx (const float *value, uint32 numValues)
 Shortcut for setting an array with a custom pointer. More...
 
void setManualValueEx (const int32 *value, uint32 numValues)
 
template<typename T >
void setManualValueEx (const T *value, uint32 numValues, ElementType elementType)
 
void setManualValueEx (const uint32 *value, uint32 numValues)
 

Public Attributes

union {
   AutoParam   ap
 
   ManualParam   mp
 
   ManualParamEx   mpEx
 
}; 
 
bool isAutomatic
 
bool isDirty
 
bool isEx
 
String name
 

Member Function Documentation

◆ getManualValue() [1/2]

template<typename T >
T Ogre::ShaderParams::Param::getManualValue ( ) const
inline

See other overload.

Examples: uint32 myVal = param->getManualValue(); Vector4 myVector4 = param->getManualValue();

◆ getManualValue() [2/2]

template<typename T >
void Ogre::ShaderParams::Param::getManualValue ( T &  value) const
inline

Returns the value.

Assumes this is a manual value. Assumes the param holds enough bytes to fill the type of value you want to retrieve. Examples: uint32 myVal; param->getManualValue( myVal ); Vector4 myVector4; param->getManualValue( myVector4 );

◆ setManualValue() [1/12]

void Ogre::ShaderParams::Param::setManualValue ( const float *  value,
uint32  numValues 
)

◆ setManualValue() [2/12]

void Ogre::ShaderParams::Param::setManualValue ( const int32 value,
uint32  numValues 
)

◆ setManualValue() [3/12]

void Ogre::ShaderParams::Param::setManualValue ( const Matrix3 value)

◆ setManualValue() [4/12]

void Ogre::ShaderParams::Param::setManualValue ( const Matrix4 value)

◆ setManualValue() [5/12]

void Ogre::ShaderParams::Param::setManualValue ( const uint32 value,
uint32  numValues 
)

◆ setManualValue() [6/12]

void Ogre::ShaderParams::Param::setManualValue ( const Vector2 value)

◆ setManualValue() [7/12]

void Ogre::ShaderParams::Param::setManualValue ( const Vector3 value)

◆ setManualValue() [8/12]

void Ogre::ShaderParams::Param::setManualValue ( const Vector4 value)

◆ setManualValue() [9/12]

void Ogre::ShaderParams::Param::setManualValue ( float  value)

Shortcut for setting the given value without dealing with mp manually.

Remarks
You can't write more than 64 bytes of data per parameter. (i.e. 16 uint32, 16 int32, or 16 floats) Remember to call
See also
ShaderParams::setDirty otherwise changes won't take effect.

◆ setManualValue() [10/12]

void Ogre::ShaderParams::Param::setManualValue ( int32  value)

◆ setManualValue() [11/12]

template<typename T >
void Ogre::ShaderParams::Param::setManualValue ( value,
uint32  numValues,
ElementType  elementType 
)

◆ setManualValue() [12/12]

void Ogre::ShaderParams::Param::setManualValue ( uint32  value)

◆ setManualValueEx() [1/4]

void Ogre::ShaderParams::Param::setManualValueEx ( const float *  value,
uint32  numValues 
)

Shortcut for setting an array with a custom pointer.

We won't free it. Caller is responsible for keeping the pointer alive while this Params hold it.

Remarks
This version is meant to be used when setManualValue's limit of 16 values is not enough for you.

Remember to call

See also
ShaderParams::setDirty otherwise changes won't take effect.

◆ setManualValueEx() [2/4]

void Ogre::ShaderParams::Param::setManualValueEx ( const int32 value,
uint32  numValues 
)

◆ setManualValueEx() [3/4]

template<typename T >
void Ogre::ShaderParams::Param::setManualValueEx ( const T *  value,
uint32  numValues,
ElementType  elementType 
)

◆ setManualValueEx() [4/4]

void Ogre::ShaderParams::Param::setManualValueEx ( const uint32 value,
uint32  numValues 
)

Member Data Documentation

◆ 

union { ... }

◆ ap

AutoParam Ogre::ShaderParams::Param::ap

◆ isAutomatic

bool Ogre::ShaderParams::Param::isAutomatic

◆ isDirty

bool Ogre::ShaderParams::Param::isDirty

◆ isEx

bool Ogre::ShaderParams::Param::isEx

◆ mp

ManualParam Ogre::ShaderParams::Param::mp

◆ mpEx

ManualParamEx Ogre::ShaderParams::Param::mpEx

◆ name

String Ogre::ShaderParams::Param::name

The documentation for this struct was generated from the following file: