OGRE  2.2.4
Object-Oriented Graphics Rendering Engine
Ogre::CompositorPassProvider Class Referenceabstract

Base class that users can derive from in order to implement custom passes for the compositor. More...

#include <OgreCompositorPassProvider.h>

+ Inheritance diagram for Ogre::CompositorPassProvider:

Public Member Functions

virtual CompositorPassaddPass (const CompositorPassDef *definition, Camera *defaultCamera, CompositorNode *parentNode, const RenderTargetViewDef *rtvDef, SceneManager *sceneManager)=0
 Creates a CompositorPass from a CompositorPassDef for Compositor Pass of type 'custom'. More...
 
virtual CompositorPassDefaddPassDef (CompositorPassType passType, IdString customId, CompositorTargetDef *parentTargetDef, CompositorNodeDef *parentNodeDef)=0
 Called from CompositorTargetDef::addPass when adding a Compositor Pass of type 'custom'. 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)
 
virtual void translateCustomPass (const AbstractNodePtr &node, CompositorPassDef *customPassDef)
 Optional override which allows users to define custom properties in the compositor scripts for custom passes. More...
 

Detailed Description

Base class that users can derive from in order to implement custom passes for the compositor.

How to implement one: You need to derive three classes:
  1. CompositorPassProvider
  2. CompositorPassDef
  3. CompositorPass

The first one is this class. You need to overload the two public virtuals. i.e. CompositorPassDef* MyProvider::addPassDef( ... ) { return OGRE_NEW MyPassDef( ... ); }

CompositorPass* MyProvider::addPass( ... ) { return OGRE_NEW MyPass( ... ); }

The second and third one are the implementations.

See also
CompositorPassScene and
CompositorPassSceneDef,
CompositorPassQuad and
CompositorPassQuadDef,
CompositorPassClear and
CompositorPassClearDef for examples on how to implement your own pass. For example, you could literally copy the code from CompositorPassClear & CompositorPassClearDef and implement your own custom pass that clears the render target.

Member Function Documentation

◆ addPass()

virtual CompositorPass* Ogre::CompositorPassProvider::addPass ( const CompositorPassDef definition,
Camera defaultCamera,
CompositorNode parentNode,
const RenderTargetViewDef rtvDef,
SceneManager sceneManager 
)
pure virtual

Creates a CompositorPass from a CompositorPassDef for Compositor Pass of type 'custom'.

Remarks
If you have multiple custom pass types then you will need to use dynamic_cast<>() on the CompositorPassDef to determine what custom pass it is.

◆ addPassDef()

virtual CompositorPassDef* Ogre::CompositorPassProvider::addPassDef ( CompositorPassType  passType,
IdString  customId,
CompositorTargetDef parentTargetDef,
CompositorNodeDef parentNodeDef 
)
pure virtual

Called from CompositorTargetDef::addPass when adding a Compositor Pass of type 'custom'.

Parameters
passType
customIdArbitrary ID in case there is more than one type of custom pass you want to implement. Defaults to IdString()
rtIndex
parentNodeDef
Returns

◆ 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,
void *   
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
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,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [2/3]

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

◆ 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,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

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

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

◆ translateCustomPass()

virtual void Ogre::CompositorPassProvider::translateCustomPass ( const AbstractNodePtr node,
CompositorPassDef customPassDef 
)
inlinevirtual

Optional override which allows users to define custom properties in the compositor scripts for custom passes.

Remarks
Please note this is called after CompositorPassProvider::addPassDef and similar to addPass you will need to dynamic_cast<>() to determine custom pass type.
Parameters
nodeThe AST node for this pass
customPassDefThe CompositorPassDef returned in CompositorPassProvider::addPassDef

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