OGRE: Ogre::RTShader::TargetRenderState Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::RTShader::TargetRenderState Class Reference
Optional Components » RTShaderSystem

This is the target render state. More...

`#include <OgreShaderRenderState.h>`

Inheritance diagram for Ogre::RTShader::TargetRenderState:
[legend]

## Public Member Functions
| TargetRenderState ()
| Class default constructor.
| ~TargetRenderState ()
void | acquirePrograms (Pass *pass)
| Acquire CPU/GPU programs set associated with the given render state and bind them to the pass.
void | addSubRenderStateInstance (SubRenderState *subRenderState)
| Add sub render state to this render state.
void | link (const RenderState &templateRS, Pass *srcPass, Pass *dstPass)
| Add the SubRenderStates of the given render state as templates to this render state.
void | link (const StringVector &srsTypes, Pass *srcPass, Pass *dstPass)
| Add the SubRenderStates to this render state.
void | releasePrograms (Pass *pass)
| Release CPU/GPU programs set associated with the given render state and pass.
void | updateGpuProgramsParams (Renderable *rend, const Pass *pass, const AutoParamDataSource *source, const LightList *pLightList)
| Update the GPU programs constant parameters before a renderable is rendered.
Public Member Functions inherited from Ogre::RTShader::RenderState
| RenderState ()
| Class default constructor.
virtual | ~RenderState ()
| Class destructor.
void | addTemplateSubRenderState (SubRenderState *subRenderState)
| Add a template sub render state to this render state.
void | addTemplateSubRenderStates (const StringVector &srsTypes)
| Add multiple template sub render states by SRS type.
int32 | getLightCount () const
| Get the maximal light count to consider.
bool | getLightCountAutoUpdate () const
| Return true if this render state override the light count.
SubRenderState * | getSubRenderState (const String &type) const
| get sub render state by type (uniquely identified) or NULL if not found
const SubRenderStateList & | getSubRenderStates () const
| Get the list of the sub render states composing this render state.
bool | haveAreaLights () const
void | removeSubRenderState (SubRenderState *subRenderState)
| Remove a sub render state from this render state.
void | resetToBuiltinSubRenderStates ()
| Reset this render state.
void | setHaveAreaLights (bool val)
void | setLightCount (int32 lightCount)
| Set the maximal light count to consider.
void | setLightCountAutoUpdate (bool autoUpdate)
| Set the light count auto update state.

## Static Public Attributes
static const char * | UserKey
| Key name for associating with a Pass instance.

## Detailed Description

This is the target render state.

This class will hold the actual generated CPU/GPU programs. It will be initially build from the FFP state of a given Pass by the FFP builder and then will be linked with the custom pass render state and the global scheme render state. See ShaderGenerator::SGPass::buildTargetRenderState().

## Constructor & Destructor Documentation

## ◆ TargetRenderState()

Ogre::RTShader::TargetRenderState::TargetRenderState | ( |  | ) |

Class default constructor.

## ◆ ~TargetRenderState()

Ogre::RTShader::TargetRenderState::~TargetRenderState | ( |  | ) |

## Member Function Documentation

## ◆ link() [1/2]

void Ogre::RTShader::TargetRenderState::link | ( | const RenderState & | templateRS,
|  | Pass * | srcPass,
|  | Pass * | dstPass )

Add the SubRenderStates of the given render state as templates to this render state.

Note
  Only sub render states with non FFP execution order will be added.

Parameters

  templateRS | The other render state to use as a template.
  srcPass | The source pass that this render state is constructed from.
  dstPass | The destination pass that constructed from this render state.

References Ogre::RTShader::RenderState::RenderState().

## ◆ link() [2/2]

void Ogre::RTShader::TargetRenderState::link | ( | const StringVector & | srsTypes,
|  | Pass * | srcPass,
|  | Pass * | dstPass )

Add the SubRenderStates to this render state.

## ◆ updateGpuProgramsParams()

void Ogre::RTShader::TargetRenderState::updateGpuProgramsParams | ( | Renderable * | rend,
|  | const Pass * | pass,
|  | const AutoParamDataSource * | source,
|  | const LightList * | pLightList )

Update the GPU programs constant parameters before a renderable is rendered.

Parameters

  rend | The renderable object that is going to be rendered.
  pass | The pass that is used to do the rendering operation.
  source | The auto parameter auto source instance.
  pLightList | The light list used for the current rendering operation.

## ◆ addSubRenderStateInstance()

void Ogre::RTShader::TargetRenderState::addSubRenderStateInstance | ( | SubRenderState * | subRenderState | ) |

Add sub render state to this render state.

Parameters

  subRenderState | The sub render state to add.

## ◆ acquirePrograms()

void Ogre::RTShader::TargetRenderState::acquirePrograms | ( | Pass * | pass | ) |

Acquire CPU/GPU programs set associated with the given render state and bind them to the pass.

Parameters

  pass | The pass to bind the programs to.

## ◆ releasePrograms()

void Ogre::RTShader::TargetRenderState::releasePrograms | ( | Pass * | pass | ) |

Release CPU/GPU programs set associated with the given render state and pass.

Parameters

  pass | The pass to release the programs from.

## Member Data Documentation

## ◆ UserKey

const char* Ogre::RTShader::TargetRenderState::UserKey
| static

Key name for associating with a Pass instance.

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

- OgreShaderRenderState.h