OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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:
+ Collaboration 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...
 
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 SubRenderStateListgetTemplateSubRenderStateList () const
 Get the list of the template sub render states composing this render state. More...
 
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 *)
 
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 * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
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...
 

Protected Attributes

int mLightCount [3]
 
bool mLightCountAutoUpdate
 
SubRenderStateList mSubRenderStateList
 

Friends

class FFPRenderStateBuilder
 
class ProgramManager
 

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 49 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
subRenderStateThe sub render state template to add.
void Ogre::RTShader::RenderState::getLightCount ( int  lightCount[3]) const

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

Definition at line 109 of file OgreShaderRenderState.h.

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

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

Definition at line 75 of file OgreShaderRenderState.h.

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

Definition at line 96 of file OgreMemoryAllocatedObject.h.

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

Definition at line 102 of file OgreMemoryAllocatedObject.h.

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

Definition at line 108 of file OgreMemoryAllocatedObject.h.

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

Definition at line 113 of file OgreMemoryAllocatedObject.h.

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

Definition at line 119 of file OgreMemoryAllocatedObject.h.

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

Definition at line 68 of file OgreMemoryAllocatedObject.h.

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

Definition at line 73 of file OgreMemoryAllocatedObject.h.

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

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

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

Definition at line 86 of file OgreMemoryAllocatedObject.h.

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

Definition at line 91 of file OgreMemoryAllocatedObject.h.

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

Remove a template sub render state from this render state.

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

Definition at line 103 of file OgreShaderRenderState.h.

Friends And Related Function Documentation

friend class FFPRenderStateBuilder
friend

Definition at line 125 of file OgreShaderRenderState.h.

friend class ProgramManager
friend

Definition at line 124 of file OgreShaderRenderState.h.

Member Data Documentation

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

Definition at line 119 of file OgreShaderRenderState.h.

bool Ogre::RTShader::RenderState::mLightCountAutoUpdate
protected

Definition at line 121 of file OgreShaderRenderState.h.

SubRenderStateList Ogre::RTShader::RenderState::mSubRenderStateList
protected

Definition at line 117 of file OgreShaderRenderState.h.


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