#include <shaderparamfloat.h>

Public Member Functions | |
| ShaderParamFloat (const std::string &name) | |
| Constructs the float paremter. | |
| virtual const ShaderParameter::ParamType & | GetType () const |
| Gets the type of this parameter. | |
| virtual void | AttachToRenderState (osg::StateSet &stateSet) |
| Assigns the necessary uniform variables for this parameter to the render state. | |
| virtual void | Update () |
| Method called by the shader owning this parameter if it detects the parameter has changed state. | |
| void | SetValue (float newValue) |
| Sets the floating point value represented by this parameter. | |
| float | GetValue () const |
| Gets the current value in this parameter. | |
| virtual ShaderParameter * | Clone () |
| Makes a deep copy of the Shader Parameter. | |
Protected Member Functions | |
| virtual | ~ShaderParamFloat () |
| dtCore::ShaderParamFloat::ShaderParamFloat | ( | const std::string & | name | ) |
Constructs the float paremter.
| name | Name given to this parameter. If it is to be used in a hardware shader, this name must match the corresponding uniform variable in the shader. |
| dtCore::ShaderParamFloat::~ShaderParamFloat | ( | ) | [protected, virtual] |
| virtual const ShaderParameter::ParamType& dtCore::ShaderParamFloat::GetType | ( | ) | const [inline, virtual] |
| void dtCore::ShaderParamFloat::AttachToRenderState | ( | osg::StateSet & | stateSet | ) | [virtual] |
Assigns the necessary uniform variables for this parameter to the render state.
This allows the parameter to communicate to the underlying shader.
Implements dtCore::ShaderParameter.
| void dtCore::ShaderParamFloat::Update | ( | ) | [virtual] |
Method called by the shader owning this parameter if it detects the parameter has changed state.
This method when called, sends the current float value in this parameter to the hardware shader.
Implements dtCore::ShaderParameter.
| void dtCore::ShaderParamFloat::SetValue | ( | float | newValue | ) | [inline] |
Sets the floating point value represented by this parameter.
| newValue | The new value to set. |
| float dtCore::ShaderParamFloat::GetValue | ( | ) | const [inline] |
Gets the current value in this parameter.
| ShaderParameter * dtCore::ShaderParamFloat::Clone | ( | ) | [virtual] |
Makes a deep copy of the Shader Parameter.
Used when a user assigns a shader to a node because we clone the template shader and its parameters. Note - Like Update(), this is a pure virtual method that must be implemented on each param.
Implements dtCore::ShaderParameter.