OGRE  14.3
Object-Oriented Graphics Rendering Engine
Ogre::RTShader::TargetRenderState Class Reference

This is the target render state. More...

#include <OgreShaderRenderState.h>

+ Inheritance diagram for Ogre::RTShader::TargetRenderState:

Public Member Functions

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

Static Public Attributes

static const char * UserKey
 Key name for associating with a Pass instance. More...
 

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
templateRSThe other render state to use as a template.
srcPassThe source pass that this render state is constructed from.
dstPassThe destination pass that constructed from this render state.

◆ 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
rendThe renderable object that is going to be rendered.
passThe pass that is used to do the rendering operation.
sourceThe auto parameter auto source instance.
pLightListThe 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
subRenderStateThe 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
passThe 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
passThe 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: