ShaderParam Class Reference
a variant type that holds params that can be passed to a shader More...
#include <ShaderParam.hh>
Public Types | |
enum | ParamType : uint16_t { PARAM_NONE = 0, PARAM_FLOAT = 1, PARAM_INT = 2 } |
Public Member Functions | |
ShaderParam () | |
constructor More... | |
ShaderParam (const ShaderParam &_other) | |
copy constructor More... | |
~ShaderParam () | |
destructor More... | |
void | operator= (const float _value) |
Set this to be a float param. More... | |
void | operator= (const int _value) |
Set this to be an integer param;. More... | |
ShaderParam & | operator= (const ShaderParam &_other) |
Set from another ShaderParam. More... | |
ParamType | Type () const |
Get the type of this parameter. More... | |
bool | Value (float *_value) const |
Get the value of this parameter if it is a float. More... | |
bool | Value (int *_value) const |
Get the value of this parameter if it is an int. More... | |
Detailed Description
a variant type that holds params that can be passed to a shader
Member Enumeration Documentation
◆ ParamType
enum ParamType : uint16_t |
Constructor & Destructor Documentation
◆ ShaderParam() [1/2]
ShaderParam | ( | ) |
constructor
◆ ShaderParam() [2/2]
ShaderParam | ( | const ShaderParam & | _other | ) |
copy constructor
- Parameters
-
[in] _other Another ShaderParam
◆ ~ShaderParam()
~ShaderParam | ( | ) |
destructor
Member Function Documentation
◆ operator=() [1/3]
void operator= | ( | const float | _value | ) |
Set this to be a float param.
- Parameters
-
[in] _value Value to set this param to.
◆ operator=() [2/3]
void operator= | ( | const int | _value | ) |
Set this to be an integer param;.
- Parameters
-
[in] _value Value to set this param to.
◆ operator=() [3/3]
ShaderParam& operator= | ( | const ShaderParam & | _other | ) |
Set from another ShaderParam.
- Parameters
-
[in] _other Another ShaderParam.
- Returns
- Reference to this ShaderParam.
◆ Type()
ParamType Type | ( | ) | const |
Get the type of this parameter.
- Returns
- Type of this parameter
◆ Value() [1/2]
bool Value | ( | float * | _value | ) | const |
Get the value of this parameter if it is a float.
- Parameters
-
[out] _value variable the value will be copied to
- Returns
- true if the param is the expected type
◆ Value() [2/2]
bool Value | ( | int * | _value | ) | const |
Get the value of this parameter if it is an int.
- Parameters
-
[out] _value variable the value will be copied to
- Returns
- true if the param is the expected type
The documentation for this class was generated from the following file: