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

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

`#include <OgreShaderRenderState.h>`

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

## Public Member Functions

| 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.

## 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.

Referenced by Ogre::RTShader::TargetRenderState::link().

## ~RenderState()

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

virtual

Class destructor.

## Member Function Documentation

## resetToBuiltinSubRenderStates()

void Ogre::RTShader::RenderState::resetToBuiltinSubRenderStates | ( |  | ) |

Reset this render state.

## addTemplateSubRenderState()

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

Add a template sub render state to this render state.

Parameters

  subRenderState | The sub render state template to add.

## addTemplateSubRenderStates()

void Ogre::RTShader::RenderState::addTemplateSubRenderStates | ( | const StringVector & | srsTypes | ) |

Add multiple template sub render states by SRS type.

## removeSubRenderState()

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

Remove a sub render state from this render state.

Parameters

  subRenderState | The sub render state to remove.

## getSubRenderStates()

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

inline

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

## getSubRenderState()

SubRenderState * Ogre::RTShader::RenderState::getSubRenderState | ( | const String & | type | ) | const

get sub render state by type (uniquely identified) or NULL if not found

## setLightCount()

void Ogre::RTShader::RenderState::setLightCount | ( | int32 | lightCount | ) |

inline

Set the maximal light count to consider.

## getLightCount()

int32 Ogre::RTShader::RenderState::getLightCount | ( |  | ) | const

inline

Get the maximal light count to consider.

## 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.

## haveAreaLights()

bool Ogre::RTShader::RenderState::haveAreaLights | ( |  | ) | const

inline

## setHaveAreaLights()

void Ogre::RTShader::RenderState::setHaveAreaLights | ( | bool | val | ) |

inline

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

- OgreShaderRenderState.h