OGRE
13.6
Object-Oriented Graphics Rendering Engine
|
Chain of compositor effects applying to one viewport. More...
#include <OgreCompositorChain.h>
Public Types | |
enum | { BEST = 0 , LAST = (size_t)-1 , NPOS = LAST } |
typedef VectorIterator< Instances > | InstanceIterator |
typedef std::vector< CompositorInstance * > | Instances |
Data types. More... | |
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. More... | |
void | _compile () |
Compile this Composition chain into a series of RenderTarget operations. More... | |
CompositorInstance * | _getOriginalSceneCompositor (void) |
Get the original scene compositor instance for this chain (internal use). More... | |
void | _markDirty () |
Mark state as dirty, and to be recompiled next frame. More... | |
void | _notifyViewport (Viewport *vp) |
Set viewport that is the target of this chain. More... | |
void | _queuedOperation (CompositorInstance::RenderSystemOperation *op) |
Internal method for registering a queued operation for deletion later. More... | |
void | _removeInstance (CompositorInstance *i) |
Remove a compositor by pointer. More... | |
CompositorInstance * | addCompositor (CompositorPtr filter, size_t addPosition=LAST, const String &scheme=BLANKSTRING) |
Apply a compositor. More... | |
CompositorInstance * | getCompositor (const String &name) const |
Get compositor instance by name. More... | |
CompositorInstance * | getCompositor (size_t index) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
const Instances & | getCompositorInstances () const |
The compositor instances. More... | |
size_t | getCompositorPosition (const String &name) const |
Get compositor position by name. Returns NPOS if not found. More... | |
InstanceIterator | getCompositors () |
CompositorInstance * | getNextInstance (CompositorInstance *curr, bool activeOnly=true) |
Get the next instance in this chain to the one specified. More... | |
size_t | getNumCompositors () |
CompositorInstance * | getPreviousInstance (CompositorInstance *curr, bool activeOnly=true) |
Get the previous instance in this chain to the one specified. More... | |
Viewport * | getViewport () |
Get viewport that is the target of this chain. More... | |
void | postRenderTargetUpdate (const RenderTargetEvent &evt) override |
Called just after a RenderTarget has been rendered to. More... | |
void | postViewportUpdate (const RenderTargetViewportEvent &evt) override |
Called just after a Viewport on a RenderTarget is to be updated. More... | |
void | preRenderTargetUpdate (const RenderTargetEvent &evt) override |
Called just before a RenderTarget is about to be rendered into. More... | |
void | preViewportUpdate (const RenderTargetViewportEvent &evt) override |
Called just before a Viewport on a RenderTarget is to be updated. More... | |
void | removeAllCompositors () |
Remove all compositors. More... | |
void | removeCompositor (size_t position=LAST) |
Remove a compositor. More... | |
void | setCompositorEnabled (size_t position, bool state) |
Enable or disable a compositor, by position. More... | |
void | viewportCameraChanged (Viewport *viewport) override |
Notification of when a new camera is set to target listening Viewport. More... | |
void | viewportDestroyed (Viewport *viewport) override |
Notification of when target listening Viewport's is destroyed. More... | |
void | viewportDimensionsChanged (Viewport *viewport) override |
Notification of when target listening Viewport's dimensions changed. More... | |
Public Member Functions inherited from Ogre::RenderTargetListener | |
virtual | ~RenderTargetListener () |
virtual void | viewportAdded (const RenderTargetViewportEvent &evt) |
Called to notify listener that a Viewport has been added to the target in question. More... | |
virtual void | viewportRemoved (const RenderTargetViewportEvent &evt) |
Called to notify listener that a Viewport has been removed from the target in question. More... | |
Public Member Functions inherited from Ogre::Viewport::Listener | |
virtual | ~Listener () |
Chain of compositor effects applying to one viewport.
typedef std::vector<CompositorInstance*> Ogre::CompositorChain::Instances |
Data types.
anonymous enum |
Ogre::CompositorChain::CompositorChain | ( | Viewport * | vp | ) |
|
virtual |
Another gcc warning here, which is no problem because RenderTargetListener is never used to delete an object.
CompositorInstance* Ogre::CompositorChain::addCompositor | ( | CompositorPtr | filter, |
size_t | addPosition = LAST , |
||
const String & | scheme = BLANKSTRING |
||
) |
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::removeCompositor | ( | size_t | position = LAST | ) |
Remove a compositor.
position | Position in filter chain of filter to remove; defaults to the end (last applied filter) |
size_t Ogre::CompositorChain::getNumCompositors | ( | ) |
void Ogre::CompositorChain::removeAllCompositors | ( | ) |
Remove all compositors.
CompositorInstance* Ogre::CompositorChain::getCompositor | ( | const String & | name | ) | const |
Get compositor instance by name.
Returns null if not found.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
size_t Ogre::CompositorChain::getCompositorPosition | ( | const String & | name | ) | const |
Get compositor position by name. Returns NPOS if not found.
|
inline |
Get the original scene compositor instance for this chain (internal use).
|
inline |
The compositor instances.
The first compositor in this list is applied first, the last one is applied last.
InstanceIterator Ogre::CompositorChain::getCompositors | ( | ) |
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 |
state | enabled flag |
|
overridevirtual |
Called just before a RenderTarget is about to be rendered into.
Reimplemented from Ogre::RenderTargetListener.
|
overridevirtual |
Called just after a RenderTarget has been rendered to.
Reimplemented from Ogre::RenderTargetListener.
|
overridevirtual |
Called just before a Viewport on a RenderTarget is to be updated.
Reimplemented from Ogre::RenderTargetListener.
|
overridevirtual |
Called just after a Viewport on a RenderTarget is to be updated.
Reimplemented from Ogre::RenderTargetListener.
|
overridevirtual |
Notification of when a new camera is set to target listening Viewport.
Reimplemented from Ogre::Viewport::Listener.
|
overridevirtual |
Notification of when target listening Viewport's dimensions changed.
Reimplemented from Ogre::Viewport::Listener.
|
overridevirtual |
Notification of when target listening Viewport's is destroyed.
Reimplemented from Ogre::Viewport::Listener.
void Ogre::CompositorChain::_markDirty | ( | ) |
Mark state as dirty, and to be recompiled next frame.
Viewport* Ogre::CompositorChain::getViewport | ( | ) |
Get viewport that is the target of this chain.
void Ogre::CompositorChain::_notifyViewport | ( | Viewport * | vp | ) |
Set viewport that is the target of this chain.
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.
void Ogre::CompositorChain::_queuedOperation | ( | CompositorInstance::RenderSystemOperation * | op | ) |
Internal method for registering a queued operation for deletion later.
void Ogre::CompositorChain::_compile | ( | ) |
Compile this Composition chain into a series of RenderTarget operations.
CompositorInstance* Ogre::CompositorChain::getPreviousInstance | ( | CompositorInstance * | curr, |
bool | activeOnly = true |
||
) |
Get the previous instance in this chain to the one specified.
CompositorInstance* Ogre::CompositorChain::getNextInstance | ( | CompositorInstance * | curr, |
bool | activeOnly = true |
||
) |
Get the next instance in this chain to the one specified.