[ < ] | [ Up ] | [ > ] |  |  |  |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 3.2.4 Applying a Compositor

Adding a compositor instance to a viewport is very simple. All you need to do is:

    CompositorManager::getSingleton().addCompositor(viewport, compositorName);

Where viewport is a pointer to your viewport, and compositorName is the name of the compositor to create an instance of. By doing this, a new instance of a compositor will be added to a new compositor chain on that viewport. You can call the method multiple times to add further compositors to the chain on this viewport. By default, each compositor which is added is disabled, but you can change this state by calling:

    CompositorManager::getSingleton().setCompositorEnabled(viewport, compositorName, enabledOrDisabled);

For more information on defining and using compositors, see Demo_Compositor in the Samples area, together with the Examples.compositor script in the media area.

This document was generated by steve on June 16 2008 using texi2html