OGRE 14.3
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::CompositorChain Class Reference

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

#include <OgreCompositorChain.h>

+ Inheritance diagram for Ogre::CompositorChain:

Public Types

enum  { BEST = 0 , LAST = (size_t)-1 , NPOS = LAST }
 
typedef VectorIterator< InstancesInstanceIterator
 
typedef std::vector< CompositorInstance * > Instances
 Data types.
 

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.
 
void _compile ()
 Compile this Composition chain into a series of RenderTarget operations.
 
CompositorInstance_getOriginalSceneCompositor (void)
 Get the original scene compositor instance for this chain (internal use).
 
void _markDirty ()
 Mark state as dirty, and to be recompiled next frame.
 
void _notifyViewport (Viewport *vp)
 Set viewport that is the target of this chain.
 
void _queuedOperation (CompositorInstance::RenderSystemOperation *op)
 Internal method for registering a queued operation for deletion later.
 
void _removeInstance (CompositorInstance *i)
 Remove a compositor by pointer.
 
CompositorInstanceaddCompositor (const CompositorPtr &filter, size_t addPosition=LAST, const String &scheme=BLANKSTRING)
 Apply a compositor.
 
CompositorInstancegetCompositor (const String &name) const
 Get compositor instance by name.
 
CompositorInstancegetCompositor (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.
 
const InstancesgetCompositorInstances () const
 The compositor instances.
 
size_t getCompositorPosition (const String &name) const
 Get compositor position by name. Returns NPOS if not found.
 
InstanceIterator getCompositors ()
 
CompositorInstancegetNextInstance (CompositorInstance *curr, bool activeOnly=true)
 Get the next instance in this chain to the one specified.
 
size_t getNumCompositors ()
 
CompositorInstancegetPreviousInstance (CompositorInstance *curr, bool activeOnly=true)
 Get the previous instance in this chain to the one specified.
 
ViewportgetViewport ()
 Get viewport that is the target of this chain.
 
void postRenderTargetUpdate (const RenderTargetEvent &evt) override
 Called just after a RenderTarget has been rendered to.
 
void postViewportUpdate (const RenderTargetViewportEvent &evt) override
 Called just after a Viewport on a RenderTarget is to be updated.
 
void preRenderTargetUpdate (const RenderTargetEvent &evt) override
 Called just before a RenderTarget is about to be rendered into.
 
void preViewportUpdate (const RenderTargetViewportEvent &evt) override
 Called just before a Viewport on a RenderTarget is to be updated.
 
void removeAllCompositors ()
 Remove all compositors.
 
void removeCompositor (size_t position=LAST)
 Remove a compositor.
 
void setCompositorEnabled (size_t position, bool state)
 Enable or disable a compositor, by position.
 
void viewportCameraChanged (Viewport *viewport) override
 Notification of when a new camera is set to target listening Viewport.
 
void viewportDestroyed (Viewport *viewport) override
 Notification of when target listening Viewport's is destroyed.
 
void viewportDimensionsChanged (Viewport *viewport) override
 Notification of when target listening Viewport's dimensions changed.
 
- 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.
 
virtual void viewportRemoved (const RenderTargetViewportEvent &evt)
 Called to notify listener that a Viewport has been removed from the target in question.
 
- Public Member Functions inherited from Ogre::Viewport::Listener
virtual ~Listener ()
 

Detailed Description

Chain of compositor effects applying to one viewport.

Member Typedef Documentation

◆ Instances

◆ InstanceIterator

Member Enumeration Documentation

◆ anonymous enum

Enumerator
BEST 

Identifier for best technique.

LAST 

Identifier for "last" compositor in chain.

NPOS 

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 ( const 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 ( )
Deprecated:
use getCompositorInstances

◆ removeAllCompositors()

void Ogre::CompositorChain::removeAllCompositors ( )

Remove all compositors.

◆ getCompositor() [1/2]

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

Get compositor instance by name.

Returns null if not found.

◆ getCompositor() [2/2]

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ getCompositorPosition()

size_t Ogre::CompositorChain::getCompositorPosition ( const String name) const

Get compositor position by name. Returns NPOS if not found.

◆ _getOriginalSceneCompositor()

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

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

◆ getCompositorInstances()

const Instances & Ogre::CompositorChain::getCompositorInstances ( ) const
inline

The compositor instances.

The first compositor in this list is applied first, the last one is applied last.

◆ getCompositors()

InstanceIterator Ogre::CompositorChain::getCompositors ( )
Deprecated:
use getCompositorInstances

◆ 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
stateenabled flag

◆ preRenderTargetUpdate()

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

Called just before a RenderTarget is about to be rendered into.

This event is raised just before any of the viewports on the target are rendered to. You can perform manual rendering operations here if you want, but please note that if the Viewport objects attached to this target are set up to clear the background, you will lose whatever you render. If you want some kind of backdrop in this event you should turn off background clearing off on the viewports, and either clear the viewports yourself in this event handler before doing your rendering or just render over the top if you don't need to.

Reimplemented from Ogre::RenderTargetListener.

◆ postRenderTargetUpdate()

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

Called just after a RenderTarget has been rendered to.

This event is called just after all the viewports attached to the target in question have been rendered to. You can perform your own manual rendering commands in this event handler if you like, these will be composited with the contents of the target already there (depending on the material settings you use etc).

Reimplemented from Ogre::RenderTargetListener.

◆ preViewportUpdate()

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

Called just before a Viewport on a RenderTarget is to be updated.

This method is called before each viewport on the RenderTarget is rendered to. You can use this to perform per-viewport settings changes, such as showing / hiding particular overlays.

Reimplemented from Ogre::RenderTargetListener.

◆ postViewportUpdate()

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

Called just after a Viewport on a RenderTarget is to be updated.

This method is called after each viewport on the RenderTarget is rendered to.

Reimplemented from Ogre::RenderTargetListener.

◆ viewportCameraChanged()

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

Notification of when a new camera is set to target listening Viewport.

Reimplemented from Ogre::Viewport::Listener.

◆ viewportDimensionsChanged()

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

Notification of when target listening Viewport's dimensions changed.

Reimplemented from Ogre::Viewport::Listener.

◆ viewportDestroyed()

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

Notification of when target listening Viewport's is destroyed.

Reimplemented from Ogre::Viewport::Listener.

◆ _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.


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