Chain of compositor effects applying to one viewport. More...
#include <OgreCompositorChain.h>
Classes | |
class | RQListener |
Render queue listener used to set up rendering events. More... | |
Public Types | |
typedef vector < CompositorInstance * >::type | Instances |
Data types. | |
typedef VectorIterator< Instances > | InstanceIterator |
Public Member Functions | |
CompositorChain (Viewport *vp) | |
virtual | ~CompositorChain () |
Another gcc warning here, which is no problem because RenderTargetListener is never used to delete an object. | |
CompositorInstance * | addCompositor (CompositorPtr filter, size_t addPosition=LAST, const String &scheme=StringUtil::BLANK) |
Apply a compositor. | |
void | removeCompositor (size_t position=LAST) |
Remove a compositor. | |
size_t | getNumCompositors () |
Get the number of compositors. | |
void | removeAllCompositors () |
Remove all compositors. | |
CompositorInstance * | getCompositor (size_t index) |
Get compositor instance by position. | |
CompositorInstance * | getCompositor (const String &name) |
Get compositor instance by name. | |
CompositorInstance * | _getOriginalSceneCompositor (void) |
Get the original scene compositor instance for this chain (internal use). | |
InstanceIterator | getCompositors () |
Get an iterator over the compositor instances. | |
void | setCompositorEnabled (size_t position, bool state) |
Enable or disable a compositor, by position. | |
virtual void | preRenderTargetUpdate (const RenderTargetEvent &evt) |
virtual void | postRenderTargetUpdate (const RenderTargetEvent &evt) |
virtual void | preViewportUpdate (const RenderTargetViewportEvent &evt) |
virtual void | postViewportUpdate (const RenderTargetViewportEvent &evt) |
virtual void | viewportCameraChanged (Viewport *viewport) |
virtual void | viewportDimensionsChanged (Viewport *viewport) |
virtual void | viewportDestroyed (Viewport *viewport) |
void | _markDirty () |
Mark state as dirty, and to be recompiled next frame. | |
Viewport * | getViewport () |
Get viewport that is the target of this chain. | |
void | _removeInstance (CompositorInstance *i) |
Remove a compositor by pointer. | |
void | _queuedOperation (CompositorInstance::RenderSystemOperation *op) |
Internal method for registering a queued operation for deletion later. | |
void | _compile () |
Compile this Composition chain into a series of RenderTarget operations. | |
CompositorInstance * | getPreviousInstance (CompositorInstance *curr, bool activeOnly=true) |
Get the previous instance in this chain to the one specified. | |
CompositorInstance * | getNextInstance (CompositorInstance *curr, bool activeOnly=true) |
Get the next instance in this chain to the one specified. | |
virtual void | viewportAdded (const RenderTargetViewportEvent &evt) |
Called to notify listener that a Viewport has been added to the target in question. | |
virtual void | viewportRemoved (const RenderTargetViewportEvent &evt) |
Called to notify listener that a Viewport has been removed from the target in question. | |
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 *) |
Static Public Attributes | |
static const size_t | LAST = (size_t)-1 |
Identifier for "last" compositor in chain. | |
static const size_t | BEST = 0 |
Identifier for best technique. | |
Protected Types | |
typedef vector < CompositorInstance::RenderSystemOperation * > ::type | RenderSystemOperations |
Render System operations queued by last compile, these are created by this instance thus managed and deleted by it. | |
Protected Member Functions | |
void | clearCompiledState () |
Clear compiled state. | |
void | preTargetOperation (CompositorInstance::TargetOperation &op, Viewport *vp, Camera *cam) |
Prepare a viewport, the camera and the scene for a rendering operation. | |
void | postTargetOperation (CompositorInstance::TargetOperation &op, Viewport *vp, Camera *cam) |
Restore a viewport, the camera and the scene after a rendering operation. | |
void | createOriginalScene () |
void | destroyOriginalScene () |
void | destroyResources (void) |
destroy internal resources | |
Protected Attributes | |
Viewport * | mViewport |
Viewport affected by this CompositorChain. | |
CompositorInstance * | mOriginalScene |
Plainly renders the scene; implicit first compositor in the chain. | |
Instances | mInstances |
Postfilter instances in this chain. | |
bool | mDirty |
State needs recompile. | |
bool | mAnyCompositorsEnabled |
Any compositors enabled? | |
String | mOriginalSceneScheme |
CompositorInstance::CompiledState | mCompiledState |
Compiled state (updated with _compile). | |
CompositorInstance::TargetOperation | mOutputOperation |
RenderSystemOperations | mRenderSystemOperations |
RQListener | mOurListener |
unsigned int | mOldClearEveryFrameBuffers |
Old viewport settings. | |
uint32 | mOldVisibilityMask |
Store old scene visibility mask. | |
bool | mOldFindVisibleObjects |
Store old find visible objects. | |
float | mOldLodBias |
Store old camera LOD bias. | |
String | mOldMaterialScheme |
Store old viewport material scheme. | |
bool | mOldShadowsEnabled |
Store old shadows enabled flag. |
Chain of compositor effects applying to one viewport.
Definition at line 47 of file OgreCompositorChain.h.
Definition at line 59 of file OgreCompositorChain.h.
typedef vector<CompositorInstance*>::type Ogre::CompositorChain::Instances |
Data types.
Definition at line 58 of file OgreCompositorChain.h.
typedef vector<CompositorInstance::RenderSystemOperation*>::type Ogre::CompositorChain::RenderSystemOperations [protected] |
Render System operations queued by last compile, these are created by this instance thus managed and deleted by it.
The list is cleared with clearCompilationState()
Definition at line 176 of file OgreCompositorChain.h.
Ogre::CompositorChain::CompositorChain | ( | Viewport * | vp | ) |
virtual Ogre::CompositorChain::~CompositorChain | ( | ) | [virtual] |
Another gcc warning here, which is no problem because RenderTargetListener is never used to delete an object.
warning: `class Ogre::CompositorChain' has virtual functions but non-virtual destructor
void Ogre::CompositorChain::_compile | ( | ) |
Compile this Composition chain into a series of RenderTarget operations.
CompositorInstance* Ogre::CompositorChain::_getOriginalSceneCompositor | ( | void | ) |
Get the original scene compositor instance for this chain (internal use).
Definition at line 96 of file OgreCompositorChain.h.
void Ogre::CompositorChain::_markDirty | ( | ) |
Mark state as dirty, and to be recompiled next frame.
void Ogre::CompositorChain::_queuedOperation | ( | CompositorInstance::RenderSystemOperation * | op | ) |
Internal method for registering a queued operation for deletion later.
void Ogre::CompositorChain::_removeInstance | ( | CompositorInstance * | i | ) |
Remove a compositor by pointer.
This is internally used by CompositionTechnique to "weak" remove any instanced of a deleted technique.
CompositorInstance* Ogre::CompositorChain::addCompositor | ( | CompositorPtr | filter, | |
size_t | addPosition = LAST , |
|||
const String & | scheme = StringUtil::BLANK | |||
) |
Apply a compositor.
Initially, the filter is enabled.
filter | Filter to apply | |
addPosition | Position in filter chain to insert this filter at; defaults to the end (last applied filter) | |
scheme | Scheme to use (blank means default) |
void Ogre::CompositorChain::clearCompiledState | ( | ) | [protected] |
Clear compiled state.
void Ogre::CompositorChain::createOriginalScene | ( | ) | [protected] |
void Ogre::CompositorChain::destroyOriginalScene | ( | ) | [protected] |
void Ogre::CompositorChain::destroyResources | ( | void | ) | [protected] |
destroy internal resources
CompositorInstance* Ogre::CompositorChain::getCompositor | ( | const String & | name | ) |
Get compositor instance by name.
Returns null if not found.
CompositorInstance* Ogre::CompositorChain::getCompositor | ( | size_t | index | ) |
Get compositor instance by position.
InstanceIterator Ogre::CompositorChain::getCompositors | ( | ) |
Get an iterator over the compositor instances.
The first compositor in this list is applied first, the last one is applied last.
CompositorInstance* Ogre::CompositorChain::getNextInstance | ( | CompositorInstance * | curr, | |
bool | activeOnly = true | |||
) |
Get the next instance in this chain to the one specified.
size_t Ogre::CompositorChain::getNumCompositors | ( | ) |
Get the number of compositors.
CompositorInstance* Ogre::CompositorChain::getPreviousInstance | ( | CompositorInstance * | curr, | |
bool | activeOnly = true | |||
) |
Get the previous instance in this chain to the one specified.
Viewport* Ogre::CompositorChain::getViewport | ( | ) |
Get viewport that is the target of this chain.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 107 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
void * | ||||
) | [inherited] |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [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 118 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
void * | ptr | |||
) | [inherited] |
placement operator new
Definition at line 78 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 72 of file OgreMemoryAllocatedObject.h.
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.
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 90 of file OgreMemoryAllocatedObject.h.
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.
virtual void Ogre::CompositorChain::postRenderTargetUpdate | ( | const RenderTargetEvent & | evt | ) | [virtual] |
Reimplemented from Ogre::RenderTargetListener.
void Ogre::CompositorChain::postTargetOperation | ( | CompositorInstance::TargetOperation & | op, | |
Viewport * | vp, | |||
Camera * | cam | |||
) | [protected] |
Restore a viewport, the camera and the scene after a rendering operation.
virtual void Ogre::CompositorChain::postViewportUpdate | ( | const RenderTargetViewportEvent & | evt | ) | [virtual] |
Reimplemented from Ogre::RenderTargetListener.
virtual void Ogre::CompositorChain::preRenderTargetUpdate | ( | const RenderTargetEvent & | evt | ) | [virtual] |
Reimplemented from Ogre::RenderTargetListener.
void Ogre::CompositorChain::preTargetOperation | ( | CompositorInstance::TargetOperation & | op, | |
Viewport * | vp, | |||
Camera * | cam | |||
) | [protected] |
Prepare a viewport, the camera and the scene for a rendering operation.
virtual void Ogre::CompositorChain::preViewportUpdate | ( | const RenderTargetViewportEvent & | evt | ) | [virtual] |
Reimplemented from Ogre::RenderTargetListener.
void Ogre::CompositorChain::removeAllCompositors | ( | ) |
Remove all compositors.
void Ogre::CompositorChain::removeCompositor | ( | size_t | position = LAST |
) |
Remove a compositor.
position | Position in filter chain of filter to remove; defaults to the end (last applied filter) |
void Ogre::CompositorChain::setCompositorEnabled | ( | size_t | position, | |
bool | state | |||
) |
Enable or disable a compositor, by position.
Disabling a compositor stops it from rendering but does not free any resources. This can be more efficient than using removeCompositor and addCompositor in cases the filter is switched on and off a lot.
position | Position in filter chain of filter |
virtual void Ogre::RenderTargetListener::viewportAdded | ( | const RenderTargetViewportEvent & | evt | ) | [virtual, inherited] |
Called to notify listener that a Viewport has been added to the target in question.
Definition at line 134 of file OgreRenderTargetListener.h.
virtual void Ogre::CompositorChain::viewportCameraChanged | ( | Viewport * | viewport | ) | [virtual] |
Reimplemented from Ogre::Viewport::Listener.
virtual void Ogre::CompositorChain::viewportDestroyed | ( | Viewport * | viewport | ) | [virtual] |
Reimplemented from Ogre::Viewport::Listener.
virtual void Ogre::CompositorChain::viewportDimensionsChanged | ( | Viewport * | viewport | ) | [virtual] |
Reimplemented from Ogre::Viewport::Listener.
virtual void Ogre::RenderTargetListener::viewportRemoved | ( | const RenderTargetViewportEvent & | evt | ) | [virtual, inherited] |
Called to notify listener that a Viewport has been removed from the target in question.
Definition at line 139 of file OgreRenderTargetListener.h.
const size_t Ogre::CompositorChain::BEST = 0 [static] |
Identifier for best technique.
Definition at line 64 of file OgreCompositorChain.h.
const size_t Ogre::CompositorChain::LAST = (size_t)-1 [static] |
Identifier for "last" compositor in chain.
Definition at line 62 of file OgreCompositorChain.h.
bool Ogre::CompositorChain::mAnyCompositorsEnabled [protected] |
Any compositors enabled?
Definition at line 166 of file OgreCompositorChain.h.
Compiled state (updated with _compile).
Definition at line 171 of file OgreCompositorChain.h.
bool Ogre::CompositorChain::mDirty [protected] |
State needs recompile.
Definition at line 164 of file OgreCompositorChain.h.
Instances Ogre::CompositorChain::mInstances [protected] |
Postfilter instances in this chain.
Definition at line 161 of file OgreCompositorChain.h.
unsigned int Ogre::CompositorChain::mOldClearEveryFrameBuffers [protected] |
Old viewport settings.
Definition at line 224 of file OgreCompositorChain.h.
bool Ogre::CompositorChain::mOldFindVisibleObjects [protected] |
Store old find visible objects.
Definition at line 228 of file OgreCompositorChain.h.
float Ogre::CompositorChain::mOldLodBias [protected] |
Store old camera LOD bias.
Definition at line 230 of file OgreCompositorChain.h.
String Ogre::CompositorChain::mOldMaterialScheme [protected] |
Store old viewport material scheme.
Definition at line 232 of file OgreCompositorChain.h.
bool Ogre::CompositorChain::mOldShadowsEnabled [protected] |
Store old shadows enabled flag.
Definition at line 234 of file OgreCompositorChain.h.
uint32 Ogre::CompositorChain::mOldVisibilityMask [protected] |
Store old scene visibility mask.
Definition at line 226 of file OgreCompositorChain.h.
CompositorInstance* Ogre::CompositorChain::mOriginalScene [protected] |
Plainly renders the scene; implicit first compositor in the chain.
Definition at line 158 of file OgreCompositorChain.h.
String Ogre::CompositorChain::mOriginalSceneScheme [protected] |
Definition at line 168 of file OgreCompositorChain.h.
RQListener Ogre::CompositorChain::mOurListener [protected] |
Definition at line 222 of file OgreCompositorChain.h.
Definition at line 172 of file OgreCompositorChain.h.
Definition at line 177 of file OgreCompositorChain.h.
Viewport* Ogre::CompositorChain::mViewport [protected] |
Viewport affected by this CompositorChain.
Definition at line 154 of file OgreCompositorChain.h.
Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 23:37:16 2012