OGRE  1.12.13
Object-Oriented Graphics Rendering Engine
Ogre::RTShader::RenderState Class Reference

This is a container class for sub render state class. More...

#include <OgreShaderRenderState.h>

+ Inheritance diagram for Ogre::RTShader::RenderState:

Public Member Functions

 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...
 
const Vector3igetLightCount () const
 Get the light count per light type. More...
 
bool getLightCountAutoUpdate () const
 Return true if this render state override the light count. More...
 
const SubRenderStateListgetSubRenderStates () const
 Get the list of the sub render states composing this render state. More...
 
const SubRenderStateListgetTemplateSubRenderStateList () const
 
void removeSubRenderState (SubRenderState *subRenderState)
 Remove a sub render state from this render state. More...
 
void removeTemplateSubRenderState (SubRenderState *srs)
 
void reset ()
 Reset this render state. More...
 
void setLightCount (const Vector3i &lightCount)
 Set the light count per light type. More...
 
void setLightCountAutoUpdate (bool autoUpdate)
 Set the light count auto update state. More...
 

Detailed Description

This is a container class for sub render state class.

A render state is defined by the sub render states that compose it. The user should use this interface to define global or per material custom behavior. I.E In order to apply per pixel to a specific material one should implement a sub class of SubRenderState that perform a per pixel lighting model, get the render state of the target material and add the custom sub class to it.

Constructor & Destructor Documentation

◆ RenderState()

Ogre::RTShader::RenderState::RenderState ( )

Class default constructor.

◆ ~RenderState()

virtual Ogre::RTShader::RenderState::~RenderState ( )
virtual

Class destructor.

Member Function Documentation

◆ reset()

void Ogre::RTShader::RenderState::reset ( )

Reset this render state.

◆ addTemplateSubRenderState()

void Ogre::RTShader::RenderState::addTemplateSubRenderState ( SubRenderState subRenderState)

Add a template sub render state to this render state.

Parameters
subRenderStateThe sub render state template to add.

◆ removeSubRenderState()

void Ogre::RTShader::RenderState::removeSubRenderState ( SubRenderState subRenderState)

Remove a sub render state from this render state.

Parameters
subRenderStateThe sub render state to remove.

◆ removeTemplateSubRenderState()

void Ogre::RTShader::RenderState::removeTemplateSubRenderState ( SubRenderState srs)
inline
Deprecated:
use removeSubRenderState

◆ getTemplateSubRenderStateList()

const SubRenderStateList& Ogre::RTShader::RenderState::getTemplateSubRenderStateList ( ) const
inline
Deprecated:
use getSubRenderStates

◆ getSubRenderStates()

const SubRenderStateList& Ogre::RTShader::RenderState::getSubRenderStates ( ) const
inline

Get the list of the sub render states composing this render state.

◆ setLightCount()

void Ogre::RTShader::RenderState::setLightCount ( const Vector3i lightCount)

Set the light count per light type.

Parameters
lightCountThe light count per type. lightCount[0] defines the point light count. lightCount[1] defines the directional light count. lightCount[2] defines the spot light count.

◆ getLightCount()

const Vector3i& Ogre::RTShader::RenderState::getLightCount ( ) const

Get the light count per light type.

lightCount[0] defines the point light count. lightCount[1] defines the directional light count. lightCount[2] defines the spot light count.

◆ setLightCountAutoUpdate()

void Ogre::RTShader::RenderState::setLightCountAutoUpdate ( bool  autoUpdate)
inline

Set the light count auto update state.

If the value is false the light count will remain static for the values that were set by the user. If the value is true the light count will be updated from the owner shader generator scheme based on current scene lights. The default is true.

◆ getLightCountAutoUpdate()

bool Ogre::RTShader::RenderState::getLightCountAutoUpdate ( ) const
inline

Return true if this render state override the light count.

If light count is not overridden it will be updated from the shader generator based on current scene lights.


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