OGRE  1.10.12
Object-Oriented Graphics Rendering Engine
Ogre::CompositorChain Class Reference

Chain of compositor effects applying to one viewport. More...

#include <OgreCompositorChain.h>

+ Inheritance diagram for Ogre::CompositorChain:

Public Types

typedef VectorIterator< InstancesInstanceIterator
 
typedef vector< CompositorInstance * >::type 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...
 
CompositorInstanceaddCompositor (CompositorPtr filter, size_t addPosition=LAST, const String &scheme=BLANKSTRING)
 Apply a compositor. More...
 
CompositorInstancegetCompositor (size_t index)
 Get compositor instance by position. More...
 
CompositorInstancegetCompositor (const String &name)
 Get compositor instance by name. More...
 
InstanceIterator getCompositors ()
 Get an iterator over the compositor instances. More...
 
CompositorInstancegetNextInstance (CompositorInstance *curr, bool activeOnly=true)
 Get the next instance in this chain to the one specified. More...
 
size_t getNumCompositors ()
 Get the number of compositors. More...
 
CompositorInstancegetPreviousInstance (CompositorInstance *curr, bool activeOnly=true)
 Get the previous instance in this chain to the one specified. More...
 
ViewportgetViewport ()
 Get viewport that is the target of this chain. More...
 
virtual void postRenderTargetUpdate (const RenderTargetEvent &evt)
 
virtual void postViewportUpdate (const RenderTargetViewportEvent &evt)
 
virtual void preRenderTargetUpdate (const RenderTargetEvent &evt)
 
virtual void preViewportUpdate (const RenderTargetViewportEvent &evt)
 
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...
 
virtual void viewportAdded (const RenderTargetViewportEvent &evt)
 Called to notify listener that a Viewport has been added to the target in question. More...
 
virtual void viewportCameraChanged (Viewport *viewport)
 
virtual void viewportDestroyed (Viewport *viewport)
 
virtual void viewportDimensionsChanged (Viewport *viewport)
 
virtual void viewportRemoved (const RenderTargetViewportEvent &evt)
 Called to notify listener that a Viewport has been removed from the target in question. More...
 

Static Public Attributes

static const size_t BEST = 0
 Identifier for best technique. More...
 
static const size_t LAST = (size_t)-1
 Identifier for "last" compositor in chain. More...
 

Detailed Description

Chain of compositor effects applying to one viewport.

Member Typedef Documentation

◆ Instances

◆ InstanceIterator

Constructor & Destructor Documentation

◆ CompositorChain()

Ogre::CompositorChain::CompositorChain ( Viewport vp)

◆ ~CompositorChain()

virtual Ogre::CompositorChain::~CompositorChain ( )
virtual

Another gcc warning here, which is no problem because RenderTargetListener is never used to delete an object.

Member Function Documentation

◆ addCompositor()

CompositorInstance* Ogre::CompositorChain::addCompositor ( CompositorPtr  filter,
size_t  addPosition = LAST,
const String scheme = BLANKSTRING 
)

Apply a compositor.

Initially, the filter is enabled.

Parameters
filterFilter to apply.
addPositionPosition in filter chain to insert this filter at; defaults to the end (last applied filter).
schemeScheme to use (blank means default).

◆ removeCompositor()

void Ogre::CompositorChain::removeCompositor ( size_t  position = LAST)

Remove a compositor.

Parameters
positionPosition in filter chain of filter to remove; defaults to the end (last applied filter)

◆ getNumCompositors()

size_t Ogre::CompositorChain::getNumCompositors ( )

Get the number of compositors.

◆ removeAllCompositors()

void Ogre::CompositorChain::removeAllCompositors ( )

Remove all compositors.

◆ getCompositor() [1/2]

CompositorInstance* Ogre::CompositorChain::getCompositor ( size_t  index)

Get compositor instance by position.

◆ getCompositor() [2/2]

CompositorInstance* Ogre::CompositorChain::getCompositor ( const String name)

Get compositor instance by name.

Returns null if not found.

◆ _getOriginalSceneCompositor()

CompositorInstance* Ogre::CompositorChain::_getOriginalSceneCompositor ( void  )
inline

Get the original scene compositor instance for this chain (internal use).

◆ getCompositors()

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.

◆ setCompositorEnabled()

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.

Parameters
positionPosition in filter chain of filter

◆ preRenderTargetUpdate()

virtual void Ogre::CompositorChain::preRenderTargetUpdate ( const RenderTargetEvent evt)
virtual

◆ postRenderTargetUpdate()

virtual void Ogre::CompositorChain::postRenderTargetUpdate ( const RenderTargetEvent evt)
virtual

◆ preViewportUpdate()

virtual void Ogre::CompositorChain::preViewportUpdate ( const RenderTargetViewportEvent evt)
virtual

◆ postViewportUpdate()

virtual void Ogre::CompositorChain::postViewportUpdate ( const RenderTargetViewportEvent evt)
virtual

◆ viewportCameraChanged()

virtual void Ogre::CompositorChain::viewportCameraChanged ( Viewport viewport)
virtual

◆ viewportDimensionsChanged()

virtual void Ogre::CompositorChain::viewportDimensionsChanged ( Viewport viewport)
virtual

◆ viewportDestroyed()

virtual void Ogre::CompositorChain::viewportDestroyed ( Viewport viewport)
virtual

◆ _markDirty()

void Ogre::CompositorChain::_markDirty ( )

Mark state as dirty, and to be recompiled next frame.

◆ getViewport()

Viewport* Ogre::CompositorChain::getViewport ( )

Get viewport that is the target of this chain.

◆ _notifyViewport()

void Ogre::CompositorChain::_notifyViewport ( Viewport vp)

Set viewport that is the target of this chain.

◆ _removeInstance()

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.

◆ _queuedOperation()

void Ogre::CompositorChain::_queuedOperation ( CompositorInstance::RenderSystemOperation op)

Internal method for registering a queued operation for deletion later.

◆ _compile()

void Ogre::CompositorChain::_compile ( )

Compile this Composition chain into a series of RenderTarget operations.

◆ getPreviousInstance()

CompositorInstance* Ogre::CompositorChain::getPreviousInstance ( CompositorInstance curr,
bool  activeOnly = true 
)

Get the previous instance in this chain to the one specified.

◆ getNextInstance()

CompositorInstance* Ogre::CompositorChain::getNextInstance ( CompositorInstance curr,
bool  activeOnly = true 
)

Get the next instance in this chain to the one specified.

◆ viewportAdded()

virtual void Ogre::RenderTargetListener::viewportAdded ( const RenderTargetViewportEvent evt)
inlinevirtualinherited

Called to notify listener that a Viewport has been added to the target in question.

◆ viewportRemoved()

virtual void Ogre::RenderTargetListener::viewportRemoved ( const RenderTargetViewportEvent evt)
inlinevirtualinherited

Called to notify listener that a Viewport has been removed from the target in question.

Member Data Documentation

◆ LAST

const size_t Ogre::CompositorChain::LAST = (size_t)-1
static

Identifier for "last" compositor in chain.

◆ BEST

const size_t Ogre::CompositorChain::BEST = 0
static

Identifier for best technique.


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