Ogre::RTShader::RenderState Class Reference
RTShader

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

`#include <OgreShaderRenderState.h>`

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

List of all members.

## Public Member Functions

| RenderState ()
| Class default constructor.
virtual | ~RenderState ()
| Class destructor.
void | reset ()
| Reset this render state.
void | addTemplateSubRenderState (SubRenderState *subRenderState)
| Add a template sub render state to this render state.
void | removeTemplateSubRenderState (SubRenderState *subRenderState)
| Remove a template sub render state from this render state.
const SubRenderStateList & | getTemplateSubRenderStateList () const
| Get the list of the template sub render states composing this render state.
void | setLightCount (const int lightCount[3])
| Set the light count per light type.
void | getLightCount (int lightCount[3]) const
| Get the light count per light type.
void | setLightCountAutoUpdate (bool autoUpdate)
| Set the light count auto update state.
bool | getLightCountAutoUpdate () const
| Return true if this render state override the light count.
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info
void * | operator new[] (size_t sz)
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)

## Protected Attributes

SubRenderStateList | mSubRenderStateList
int | mLightCount [3]
bool | mLightCountAutoUpdate

## Friends

class | ProgramManager
class | FFPRenderStateBuilder

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

Definition at line 50 of file OgreShaderRenderState.h.

## Constructor & Destructor Documentation

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

Class default constructor.

virtual Ogre::RTShader::RenderState::~RenderState | ( |  | ) | `[virtual]`

Class destructor.

## Member Function Documentation

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.

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

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.

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

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.

Definition at line 110 of file OgreShaderRenderState.h.

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

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

Definition at line 76 of file OgreShaderRenderState.h.

template<class Alloc >

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

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

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

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

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

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

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

Definition at line 112 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

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

Definition at line 118 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

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

operator new, with debug line info

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

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

Definition at line 72 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  | `[inherited]`

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

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

array operator new, with debug line info

Definition at line 85 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

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

Definition at line 90 of file OgreMemoryAllocatedObject.h.

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

Remove a template sub render state from this render state.

Parameters:

  subRenderState | The sub render state to remove.

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

Reset this render state.

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

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.

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

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.

Definition at line 104 of file OgreShaderRenderState.h.

## Friends And Related Function Documentation

friend class FFPRenderStateBuilder`[friend]`

Reimplemented in Ogre::RTShader::TargetRenderState.

Definition at line 126 of file OgreShaderRenderState.h.

friend class ProgramManager`[friend]`

Reimplemented in Ogre::RTShader::TargetRenderState.

Definition at line 125 of file OgreShaderRenderState.h.

## Member Data Documentation

int Ogre::RTShader::RenderState::mLightCount[3]`[protected]`

Definition at line 120 of file OgreShaderRenderState.h.

bool Ogre::RTShader::RenderState::mLightCountAutoUpdate`[protected]`

Definition at line 122 of file OgreShaderRenderState.h.

SubRenderStateList Ogre::RTShader::RenderState::mSubRenderStateList`[protected]`

Definition at line 118 of file OgreShaderRenderState.h.

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

- OgreShaderRenderState.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:28:07