#include <OgreCompositorInstance.h>
Public Types | |
typedef std::map< int, MaterialPtr > | QuadMaterialMap |
typedef std::pair< int, RenderSystemOperation * > | RenderSystemOpPair |
typedef std::vector < RenderSystemOpPair > | RenderSystemOpPairs |
typedef std::vector < TargetOperation > | CompiledState |
Public Member Functions | |
CompositorInstance (Compositor *filter, CompositionTechnique *technique, CompositorChain *chain) | |
virtual | ~CompositorInstance () |
void | setEnabled (bool value) |
Set enabled flag. | |
bool | getEnabled () |
Get enabled flag. | |
const String & | getTextureInstanceName (const String &name, size_t mrtIndex) |
Get the instance name for a local texture. | |
RenderTarget * | getRenderTarget (const String &name) |
Get the render target for a given render texture name. | |
virtual void | _compileTargetOperations (CompiledState &compiledState) |
Recursively collect target states (except for final Pass). | |
virtual void | _compileOutputOperation (TargetOperation &finalState) |
Compile the final (output) operation. | |
Compositor * | getCompositor () |
Get Compositor of which this is an instance. | |
CompositionTechnique * | getTechnique () |
Get CompositionTechnique used by this instance. | |
CompositorChain * | getChain () |
Get Chain that this instance is part of. | |
void | addListener (Listener *l) |
Add a listener. | |
void | removeListener (Listener *l) |
Remove a listener. | |
void | _fireNotifyMaterialSetup (uint32 pass_id, MaterialPtr &mat) |
Notify listeners of a material compilation. | |
void | _fireNotifyMaterialRender (uint32 pass_id, MaterialPtr &mat) |
Notify listeners of a material render. | |
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 *) |
Private Types | |
typedef std::map< String, TexturePtr > | LocalTextureMap |
Map from name->local texture. | |
typedef std::map< String, MultiRenderTarget * > | LocalMRTMap |
Store a list of MRTs we've created. | |
typedef std::vector< Listener * > | Listeners |
Vector of listeners. | |
Private Member Functions | |
virtual void | collectPasses (TargetOperation &finalState, CompositionTargetPass *target) |
Collect rendering passes. | |
MaterialPtr | createLocalMaterial (const String &srcName) |
Create a local dummy material with one technique but no passes. | |
void | createResources () |
Create local rendertextures and other resources. | |
void | freeResources () |
Destroy local rendertextures and other resources. | |
RenderTarget * | getTargetForTex (const String &name) |
Get RenderTarget for a named local texture. | |
const String & | getSourceForTex (const String &name, size_t mrtIndex=0) |
Get source texture name for a named local texture. | |
void | queueRenderSystemOp (TargetOperation &finalState, RenderSystemOperation *op) |
Queue a render system operation. | |
String | getMRTTexLocalName (const String &baseName, size_t attachment) |
Util method for assigning a local texture name to a MRT attachment. | |
void | deriveTextureRenderTargetOptions (const String &texname, bool *hwGammaWrite, uint *fsaa) |
Search for options like AA and hardware gamma which we may want to inherit from the main render target to which we're attached. | |
Private Attributes | |
Compositor * | mCompositor |
Compositor of which this is an instance. | |
CompositionTechnique * | mTechnique |
Composition technique used by this instance. | |
CompositorChain * | mChain |
Composition chain of which this instance is part. | |
bool | mEnabled |
Is this instance enabled? | |
LocalTextureMap | mLocalTextures |
LocalMRTMap | mLocalMRTs |
Listeners | mListeners |
CompositorInstance * | mPreviousInstance |
Previous instance (set by chain). | |
Friends | |
class | CompositorChain |
Classes | |
class | Listener |
Provides an interface to "listen in" to to render system operations executed by this CompositorInstance. More... | |
class | RenderSystemOperation |
Specific render system operation. More... | |
class | TargetOperation |
Operation setup for a RenderTarget (collected). More... |
It is part of the CompositorChain for a Viewport.
Definition at line 42 of file OgreCompositorInstance.h.
typedef std::map<int, MaterialPtr> Ogre::CompositorInstance::QuadMaterialMap |
Definition at line 87 of file OgreCompositorInstance.h.
typedef std::pair<int, RenderSystemOperation*> Ogre::CompositorInstance::RenderSystemOpPair |
Definition at line 88 of file OgreCompositorInstance.h.
typedef std::vector<RenderSystemOpPair> Ogre::CompositorInstance::RenderSystemOpPairs |
Definition at line 89 of file OgreCompositorInstance.h.
typedef std::vector<TargetOperation> Ogre::CompositorInstance::CompiledState |
Definition at line 145 of file OgreCompositorInstance.h.
typedef std::map<String,TexturePtr> Ogre::CompositorInstance::LocalTextureMap [private] |
typedef std::map<String,MultiRenderTarget*> Ogre::CompositorInstance::LocalMRTMap [private] |
typedef std::vector<Listener*> Ogre::CompositorInstance::Listeners [private] |
Ogre::CompositorInstance::CompositorInstance | ( | Compositor * | filter, | |
CompositionTechnique * | technique, | |||
CompositorChain * | chain | |||
) |
virtual Ogre::CompositorInstance::~CompositorInstance | ( | ) | [virtual] |
void Ogre::CompositorInstance::setEnabled | ( | bool | value | ) |
Set enabled flag.
The compositor instance will only render if it is enabled, otherwise it is pass-through.
bool Ogre::CompositorInstance::getEnabled | ( | ) |
Get enabled flag.
const String& Ogre::CompositorInstance::getTextureInstanceName | ( | const String & | name, | |
size_t | mrtIndex | |||
) |
Get the instance name for a local texture.
name | The name of the texture in the original compositor definition | |
mrtIndex | If name identifies a MRT, which texture attachment to retrieve |
RenderTarget* Ogre::CompositorInstance::getRenderTarget | ( | const String & | name | ) |
Get the render target for a given render texture name.
virtual void Ogre::CompositorInstance::_compileTargetOperations | ( | CompiledState & | compiledState | ) | [virtual] |
Recursively collect target states (except for final Pass).
compiledState | This vector will contain a list of TargetOperation objects |
virtual void Ogre::CompositorInstance::_compileOutputOperation | ( | TargetOperation & | finalState | ) | [virtual] |
Compile the final (output) operation.
This is done separately because this is combined with the input in chained filters.
Compositor* Ogre::CompositorInstance::getCompositor | ( | ) |
Get Compositor of which this is an instance.
CompositionTechnique* Ogre::CompositorInstance::getTechnique | ( | ) |
Get CompositionTechnique used by this instance.
CompositorChain* Ogre::CompositorInstance::getChain | ( | ) |
Get Chain that this instance is part of.
void Ogre::CompositorInstance::addListener | ( | Listener * | l | ) |
Add a listener.
Listeners provide an interface to "listen in" to to render system operations executed by this CompositorInstance so that materials can be programmatically set up.
void Ogre::CompositorInstance::removeListener | ( | Listener * | l | ) |
void Ogre::CompositorInstance::_fireNotifyMaterialSetup | ( | uint32 | pass_id, | |
MaterialPtr & | mat | |||
) |
Notify listeners of a material compilation.
void Ogre::CompositorInstance::_fireNotifyMaterialRender | ( | uint32 | pass_id, | |
MaterialPtr & | mat | |||
) |
Notify listeners of a material render.
virtual void Ogre::CompositorInstance::collectPasses | ( | TargetOperation & | finalState, | |
CompositionTargetPass * | target | |||
) | [private, virtual] |
Collect rendering passes.
Here, passes are converted into render target operations and queued with queueRenderSystemOp.
MaterialPtr Ogre::CompositorInstance::createLocalMaterial | ( | const String & | srcName | ) | [private] |
Create a local dummy material with one technique but no passes.
The material is detached from the Material Manager to make sure it is destroyed when going out of scope.
void Ogre::CompositorInstance::createResources | ( | ) | [private] |
Create local rendertextures and other resources.
Builds mLocalTextures.
void Ogre::CompositorInstance::freeResources | ( | ) | [private] |
Destroy local rendertextures and other resources.
RenderTarget* Ogre::CompositorInstance::getTargetForTex | ( | const String & | name | ) | [private] |
Get RenderTarget for a named local texture.
const String& Ogre::CompositorInstance::getSourceForTex | ( | const String & | name, | |
size_t | mrtIndex = 0 | |||
) | [private] |
Get source texture name for a named local texture.
name | The local name of the texture as given to it in the compositor | |
mrtIndex | For MRTs, which attached surface to retrieve |
void Ogre::CompositorInstance::queueRenderSystemOp | ( | TargetOperation & | finalState, | |
RenderSystemOperation * | op | |||
) | [private] |
Queue a render system operation.
String Ogre::CompositorInstance::getMRTTexLocalName | ( | const String & | baseName, | |
size_t | attachment | |||
) | [private] |
Util method for assigning a local texture name to a MRT attachment.
void Ogre::CompositorInstance::deriveTextureRenderTargetOptions | ( | const String & | texname, | |
bool * | hwGammaWrite, | |||
uint * | fsaa | |||
) | [private] |
Search for options like AA and hardware gamma which we may want to inherit from the main render target to which we're attached.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 67 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
void * | ptr | |||
) | [inherited] |
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 84 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [inherited] |
Definition at line 89 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
void * | ||||
) | [inherited] |
Definition at line 95 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 106 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
friend class CompositorChain [friend] |
Definition at line 284 of file OgreCompositorInstance.h.
Compositor* Ogre::CompositorInstance::mCompositor [private] |
Composition technique used by this instance.
Definition at line 222 of file OgreCompositorInstance.h.
CompositorChain* Ogre::CompositorInstance::mChain [private] |
Composition chain of which this instance is part.
Definition at line 224 of file OgreCompositorInstance.h.
bool Ogre::CompositorInstance::mEnabled [private] |
Definition at line 229 of file OgreCompositorInstance.h.
Definition at line 232 of file OgreCompositorInstance.h.
Definition at line 236 of file OgreCompositorInstance.h.
Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 27 22:03:05 2009