#include <shaderparamtexture2d.h>

Public Member Functions | |
| ShaderParamTexture2D (const std::string &name) | |
| Constructs the texture parameter. | |
| virtual const ShaderParameter::ParamType & | GetType () const |
| Gets the type of this shader parameter. | |
| virtual void | AttachToRenderState (osg::StateSet &stateSet) |
| Assigns the 2D texture parameter to the render state. | |
| virtual void | DetachFromRenderState (osg::StateSet &stateSet) |
| Each shader parameter has this chance to clean itself up from the stateset. | |
| void | ApplyTexture2DValues () |
| Sets the Filters and wrap modes on the Texture2D object. | |
| virtual void | Update () |
| Updates the texture attributes attached to this shader parameter. | |
| virtual void | SetTexture (const std::string &path) |
| Sets the path to the texture to use for this parameter. | |
| void | LoadImage () |
| Loads the image. | |
| void | SetAddressMode (const TextureAxis &axis, const AddressMode &mode) |
| Overriden from TextureShaderParameter Sets the texture addressing mode. | |
| virtual ShaderParameter * | Clone () |
| Makes a deep copy of the Shader Parameter. | |
Protected Member Functions | |
| virtual | ~ShaderParamTexture2D () |
| Destroys the texture parameter. | |
| dtCore::ShaderParamTexture2D::ShaderParamTexture2D | ( | const std::string & | name | ) |
Constructs the texture parameter.
| dtCore::ShaderParamTexture2D::~ShaderParamTexture2D | ( | ) | [protected, virtual] |
Destroys the texture parameter.
| virtual const ShaderParameter::ParamType& dtCore::ShaderParamTexture2D::GetType | ( | ) | const [inline, virtual] |
| void dtCore::ShaderParamTexture2D::AttachToRenderState | ( | osg::StateSet & | stateSet | ) | [virtual] |
| void dtCore::ShaderParamTexture2D::DetachFromRenderState | ( | osg::StateSet & | stateSet | ) | [virtual] |
Each shader parameter has this chance to clean itself up from the stateset.
It should remoave whatever attributes and properties that it set when it was attached.
| stateSet | The render state to cleanup. |
Reimplemented from dtCore::ShaderParameter.
| void dtCore::ShaderParamTexture2D::ApplyTexture2DValues | ( | ) |
Sets the Filters and wrap modes on the Texture2D object.
| void dtCore::ShaderParamTexture2D::Update | ( | ) | [virtual] |
Updates the texture attributes attached to this shader parameter.
Implements dtCore::ShaderParamTexture.
| void dtCore::ShaderParamTexture2D::SetTexture | ( | const std::string & | path | ) | [virtual] |
Sets the path to the texture to use for this parameter.
| path | The path to the texture file. Must be relative to the current delta3d data file path. |
Reimplemented from dtCore::ShaderParamTexture.
| void dtCore::ShaderParamTexture2D::LoadImage | ( | ) |
Loads the image.
Called when SetTexture is called.
| void dtCore::ShaderParamTexture2D::SetAddressMode | ( | const TextureAxis & | axis, | |
| const AddressMode & | mode | |||
| ) |
Overriden from TextureShaderParameter Sets the texture addressing mode.
This is applied when texture coordinates wishing to access this texture parameter fall outside of the range 0.0 - 1.0.
| axis | The axis enumeration to assign the address mode to. | |
| mode | The address mode enumeration to assign. |
Reimplemented from dtCore::ShaderParamTexture.
| ShaderParameter * dtCore::ShaderParamTexture2D::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::ShaderParamTexture.