OGRE: Ogre::RTShader::TargetRenderState Class Reference

| OGRE 2.2.4 Object-Oriented Graphics Rendering Engine

Public Member Functions | Friends | List of all members
Ogre::RTShader::TargetRenderState Class Reference
Core » RTShader

This is the target render state. More...

`#include <OgreShaderRenderState.h>`

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

## Public Member Functions
| TargetRenderState ()
| Class default constructor. More...
virtual | ~TargetRenderState ()
| Class destructor. More...
void | addTemplateSubRenderState (SubRenderState *subRenderState)
| Add a template sub render state to this render state. More...
void | getLightCount (int lightCount[3]) const
| Get the light count per light type. More...
bool | getLightCountAutoUpdate () const
| Return true if this render state override the light count. More...
const SubRenderStateList & | getTemplateSubRenderStateList () const
| Get the list of the template sub render states composing this render state. More...
void | link (const RenderState &other, Pass *srcPass, Pass *dstPass)
| Link this target render state with the given render state. More...
void | operator delete (void *ptr)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete (void *ptr, void *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
void * | operator new (size_t sz)
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info More...
void * | operator new (size_t sz, void *ptr)
| placement operator new More...
void * | operator new[] (size_t sz)
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info More...
void | removeTemplateSubRenderState (SubRenderState *subRenderState)
| Remove a template sub render state from this render state. More...
void | reset ()
| Reset this render state. More...
void | setLightCount (const int lightCount[3])
| Set the light count per light type. More...
void | setLightCountAutoUpdate (bool autoUpdate)
| Set the light count auto update state. More...
void | updateGpuProgramsParams (Renderable *rend, Pass *pass, const AutoParamDataSource *source, const LightList *pLightList)
| Update the GPU programs constant parameters before a renderable is rendered. More...

## Friends
class | FFPRenderStateBuilder
class | ProgramManager

## 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()

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

Class destructor.

## Member Function Documentation

## ◆ addTemplateSubRenderState()

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

Add a template sub render state to this render state.

Parameters

  subRenderState | The sub render state template to add.

## ◆ getLightCount()

void Ogre::RTShader::RenderState::getLightCount | ( | int | lightCount[3] | ) | const
| inherited

Get the light count per light type.

Parameters

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

## ◆ getLightCountAutoUpdate()

bool Ogre::RTShader::RenderState::getLightCountAutoUpdate | ( |  | ) | const
| inlineinherited

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.

## ◆ getTemplateSubRenderStateList()

const SubRenderStateList& Ogre::RTShader::RenderState::getTemplateSubRenderStateList | ( |  | ) | const
| inlineinherited

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

## ◆ link()

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

Link this target render state with the given render state.

Only sub render states with execution order that don't exist in this render state will be added.

Parameters

  other | The other render state to append to this state.
  srcPass | The source pass that this render state is constructed from.
  dstPass | The destination pass that constructed from this render state.

## ◆ operator delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |
| inlineinherited

## ◆ operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |
| inlineinherited

## ◆ operator delete() [3/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |
| inlineinherited

## ◆ operator delete[]() [1/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) |
| inlineinherited

## ◆ operator delete[]() [2/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |
| inlineinherited

## ◆ operator new() [1/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |
| inlineinherited

## ◆ operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |
| inlineinherited

operator new, with debug line info

## ◆ operator new() [3/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  |
| inlineinherited

placement operator new

## ◆ operator new[]() [1/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) |
| inlineinherited

## ◆ operator new[]() [2/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |
| inlineinherited

array operator new, with debug line info

## ◆ removeTemplateSubRenderState()

void Ogre::RTShader::RenderState::removeTemplateSubRenderState | ( | SubRenderState * | subRenderState | ) |
| inherited

Remove a template sub render state from this render state.

Parameters

  subRenderState | The sub render state to remove.

## ◆ reset()

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

Reset this render state.

## ◆ setLightCount()

void Ogre::RTShader::RenderState::setLightCount | ( | const int | lightCount[3] | ) |
| inherited

Set the light count per light type.

Parameters

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

## ◆ setLightCountAutoUpdate()

void Ogre::RTShader::RenderState::setLightCountAutoUpdate | ( | bool | autoUpdate | ) |
| inlineinherited

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.

## ◆ updateGpuProgramsParams()

void Ogre::RTShader::TargetRenderState::updateGpuProgramsParams | ( | Renderable * | rend,
|  | 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.

## Friends And Related Function Documentation

## ◆ FFPRenderStateBuilder

friend class FFPRenderStateBuilder
| friend

## ◆ ProgramManager

friend class ProgramManager
| friend

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

- OgreShaderRenderState.h