OGRE-Next: Ogre::ShaderParams::Param Struct Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Ogre::ShaderParams::Param Struct Reference

`#include <OgreShaderParams.h>`

## Public Member Functions
template<typename T>
T | getManualValue () const
| See other overload.
template<typename T>
void | getManualValue (T &value) const
| Returns the value.
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.
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.
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();

References 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 );

References isAutomatic, isEx, and mp.

Referenced by getManualValue().

## ◆ 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 | ( | T | 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]

union { ... } Ogre::ShaderParams::Param

## ◆ ap

AutoParam Ogre::ShaderParams::Param::ap

## ◆ isAutomatic

bool Ogre::ShaderParams::Param::isAutomatic

Referenced by getManualValue().

## ◆ isDirty

bool Ogre::ShaderParams::Param::isDirty

## ◆ isEx

bool Ogre::ShaderParams::Param::isEx

Referenced by getManualValue().

## ◆ mp

ManualParam Ogre::ShaderParams::Param::mp

Referenced by getManualValue().

## ◆ mpEx

ManualParamEx Ogre::ShaderParams::Param::mpEx

## ◆ name

String Ogre::ShaderParams::Param::name

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

- OgreShaderParams.h