Ogre::RTShader::SubRenderState Class Reference
RTShader

This class is the base interface of sub part from a shader based rendering pipeline. More...

`#include <OgreShaderSubRenderState.h>`

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

List of all members.

## Public Member Functions

| SubRenderState ()
| Class default constructor.
virtual | ~SubRenderState ()
| Class destructor.
virtual const String & | getType () const =0
| Get the type of this sub render state.
virtual int | getExecutionOrder () const =0
| Get the execution order of this sub render state.
virtual void | copyFrom (const SubRenderState &rhs)=0
| Copy details from a given sub render state to this one.
SubRenderState & | operator= (const SubRenderState &rhs)
| Operator = declaration.
virtual bool | createCpuSubPrograms (ProgramSet *programSet)
| Create sub programs that represents this sub render state as part of a program set.
virtual void | updateGpuProgramsParams (Renderable *rend, Pass *pass, const AutoParamDataSource *source, const LightList *pLightList)
| Update GPU programs parameters before a rendering operation occurs.
virtual bool | preAddToRenderState (const RenderState *renderState, Pass *srcPass, Pass *dstPass)
| Called before adding this sub render state to the given render state.
SubRenderStateAccessorPtr | getAccessor ()
| Return the accessor object to this sub render state.
SubRenderStateAccessorPtr | getAccessor () const
| Return the accessor object to this sub render state.
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 Member Functions

virtual bool | resolveParameters (ProgramSet *programSet)
| Resolve parameters that this sub render state requires.
virtual bool | resolveDependencies (ProgramSet *programSet)
| Resolve dependencies that this sub render state requires.
virtual bool | addFunctionInvocations (ProgramSet *programSet)
| Add function invocation that this sub render state requires.

## Private Attributes

SubRenderStateAccessorPtr | mThisAccessor
SubRenderStateAccessorPtr | mOtherAccessor

## Detailed Description

This class is the base interface of sub part from a shader based rendering pipeline.

All sub parts implementations should derive from it and implement the needed methods. A simple example of sub class of this interface will be the transform sub state of the fixed pipeline.

Definition at line 56 of file OgreShaderSubRenderState.h.

## Constructor & Destructor Documentation

Ogre::RTShader::SubRenderState::SubRenderState | ( |  | ) |

Class default constructor.

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

Class destructor.

## Member Function Documentation

virtual bool Ogre::RTShader::SubRenderState::addFunctionInvocations | ( | ProgramSet * | programSet | ) | `[protected, virtual]`

Add function invocation that this sub render state requires.

Parameters:

  programSet | container class of CPU and GPU programs that this sub state will affect on.

Remarks:
  Internal method called in the context of SubRenderState::createCpuSubPrograms implementation.

virtual void Ogre::RTShader::SubRenderState::copyFrom | ( | const SubRenderState & | rhs | ) | `[pure virtual]`

Copy details from a given sub render state to this one.

Parameters:

  rhs | the source sub state to copy from.

virtual bool Ogre::RTShader::SubRenderState::createCpuSubPrograms | ( | ProgramSet * | programSet | ) | `[virtual]`

Create sub programs that represents this sub render state as part of a program set.

The given program set contains CPU programs that represents a vertex shader and pixel shader. One should use these program class API to create a representation of the sub state he wished to implement.

Parameters:

  programSet | container class of CPU and GPU programs that this sub state will affect on.

SubRenderStateAccessorPtr Ogre::RTShader::SubRenderState::getAccessor | ( |  | ) |

Return the accessor object to this sub render state.

See also:
  SubRenderStateAccessor.

SubRenderStateAccessorPtr Ogre::RTShader::SubRenderState::getAccessor | ( |  | ) | const

Return the accessor object to this sub render state.

See also:
  SubRenderStateAccessor.

virtual int Ogre::RTShader::SubRenderState::getExecutionOrder | ( |  | ) | const`[pure virtual]`

Get the execution order of this sub render state.

Remarks:
  The return value should be synchronized with the predefined values of the FFPShaderStage enum.

virtual const String& Ogre::RTShader::SubRenderState::getType | ( |  | ) | const`[pure virtual]`

Get the type of this sub render state.

Remarks:
  The type string should be unique among all registered sub render states.

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.

SubRenderState& Ogre::RTShader::SubRenderState::operator= | ( | const SubRenderState & | rhs | ) |

Operator = declaration.

Assign the given source sub state to this sub state.

Parameters:

  rhs | the source sub state to copy from.

virtual bool Ogre::RTShader::SubRenderState::preAddToRenderState | ( | const RenderState * | renderState,
|  | Pass * | srcPass,
|  | Pass * | dstPass
| ) |  | `[virtual]`

Called before adding this sub render state to the given render state.

Allows this sub render state class to configure specific parameters depending on source pass or parent render state. Return of false value will cause canceling the add operation.

Parameters:

  renderState | The target render state container this sub render state is about to be added.
  srcPass | The source pass.
  dstPass | The destination pass.

Definition at line 120 of file OgreShaderSubRenderState.h.

virtual bool Ogre::RTShader::SubRenderState::resolveDependencies | ( | ProgramSet * | programSet | ) | `[protected, virtual]`

Resolve dependencies that this sub render state requires.

Parameters:

  programSet | container class of CPU and GPU programs that this sub state will affect on.

Remarks:
  Internal method called in the context of SubRenderState::createCpuSubPrograms implementation.

virtual bool Ogre::RTShader::SubRenderState::resolveParameters | ( | ProgramSet * | programSet | ) | `[protected, virtual]`

Resolve parameters that this sub render state requires.

Parameters:

  programSet | container class of CPU and GPU programs that this sub state will affect on.

Remarks:
  Internal method called in the context of SubRenderState::createCpuSubPrograms implementation.

virtual void Ogre::RTShader::SubRenderState::updateGpuProgramsParams | ( | Renderable * | rend,
|  | Pass * | pass,
|  | const AutoParamDataSource * | source,
|  | const LightList * | pLightList
| ) |  | `[virtual]`

Update GPU programs parameters before a rendering operation occurs.

This method is called in the context of SceneManager::renderSingle object via the RenderObjectListener interface and lets this sub render state instance opportunity to update custom GPU program parameters before the rendering action occurs.

See also:
  RenderObjectListener::notifyRenderSingleObject.

Parameters:

  rend | The renderable that is about to be rendered.
  pass | The pass that used for this rendering. The auto parameter source. The light list used in the current rendering context.

Definition at line 111 of file OgreShaderSubRenderState.h.

## Member Data Documentation

SubRenderStateAccessorPtr Ogre::RTShader::SubRenderState::mOtherAccessor`[private]`

Definition at line 158 of file OgreShaderSubRenderState.h.

SubRenderStateAccessorPtr Ogre::RTShader::SubRenderState::mThisAccessor`[mutable, private]`

Definition at line 156 of file OgreShaderSubRenderState.h.

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

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