![]() |
OGRE 1.12.10
Object-Oriented Graphics Rendering Engine
|
An instance of a Compositor object for one Viewport. More...
#include <OgreCompositorInstance.h>
Inheritance diagram for Ogre::CompositorInstance:Classes | |
| class | Listener |
| Provides an interface to "listen in" to to render system operations executed by this CompositorInstance. More... | |
| class | RenderSystemOperation |
| Specific render system operation. More... | |
| class | TargetOperation |
| Operation setup for a RenderTarget (collected). More... | |
Public Types | |
| typedef std::vector< TargetOperation > | CompiledState |
| typedef std::map< int, MaterialPtr > | QuadMaterialMap |
| typedef std::pair< int, RenderSystemOperation * > | RenderSystemOpPair |
| typedef std::vector< RenderSystemOpPair > | RenderSystemOpPairs |
Public Member Functions | |
| CompositorInstance (CompositionTechnique *technique, CompositorChain *chain) | |
| virtual | ~CompositorInstance () |
| virtual void | _compileOutputOperation (TargetOperation &finalState) |
| Compile the final (output) operation. | |
| virtual void | _compileTargetOperations (CompiledState &compiledState) |
| Recursively collect target states (except for final Pass). | |
| void | _fireNotifyMaterialRender (uint32 pass_id, MaterialPtr &mat) |
| Notify listeners of a material render. | |
| void | _fireNotifyMaterialSetup (uint32 pass_id, MaterialPtr &mat) |
| Notify listeners of a material compilation. | |
| void | _fireNotifyResourcesCreated (bool forResizeOnly) |
| Notify listeners of a material render. | |
| void | _fireNotifyResourcesReleased (bool forResizeOnly) |
| Notify listeners ressources. | |
| void | addListener (Listener *l) |
| Add a listener. | |
| bool | getAlive () const |
| Get alive flag. | |
| CompositorChain * | getChain () |
| Get Chain that this instance is part of. | |
| Compositor * | getCompositor () |
| Get Compositor of which this is an instance. | |
| bool | getEnabled () const |
| Get enabled flag. | |
| RenderTarget * | getRenderTarget (const String &name) |
| Get the render target for a given render texture name. | |
| const String & | getScheme () const |
| Returns the name of the scheme this compositor is using. | |
| CompositionTechnique * | getTechnique () |
| Get CompositionTechnique used by this instance. | |
| const TexturePtr & | getTextureInstance (const String &name, size_t mrtIndex) |
| Get the instance of a local texture. | |
| const String & | getTextureInstanceName (const String &name, size_t mrtIndex) |
| Get the instance name for a local texture. | |
| void | notifyResized () |
| Notify this instance that the primary surface has been resized. | |
| void | removeListener (Listener *l) |
| Remove a listener. | |
| void | setAlive (bool value) |
| Set alive/active flag. | |
| void | setEnabled (bool value) |
| Set enabled flag. | |
| void | setScheme (const String &schemeName, bool reuseTextures=true) |
| Pick a technique to use to render this compositor based on a scheme. | |
| void | setTechnique (CompositionTechnique *tech, bool reuseTextures=true) |
| Change the technique we're using to render this compositor. | |
An instance of a Compositor object for one Viewport.
It is part of the CompositorChain for a Viewport.
| Ogre::CompositorInstance::CompositorInstance | ( | CompositionTechnique * | technique, |
| CompositorChain * | chain | ||
| ) |
|
virtual |
Set enabled flag.
The compositor instance will only render if it is enabled, otherwise it is pass-through. Resources are only created if they weren't alive when enabling.
|
inline |
Get enabled flag.
Set alive/active flag.
The compositor instance will create resources when alive, and destroy them when inactive.
|
inline |
Get alive flag.
| const String & Ogre::CompositorInstance::getTextureInstanceName | ( | const String & | name, |
| size_t | mrtIndex | ||
| ) |
Get the instance name for a local texture.
| name | The name of the texture in the original compositor definition. |
| mrtIndex | If name identifies a MRT, which texture attachment to retrieve. |
| const TexturePtr & Ogre::CompositorInstance::getTextureInstance | ( | const String & | name, |
| size_t | mrtIndex | ||
| ) |
Get the instance of a local texture.
| name | The name of the texture in the original compositor definition. |
| mrtIndex | If name identifies a MRT, which texture attachment to retrieve. |
| RenderTarget * Ogre::CompositorInstance::getRenderTarget | ( | const String & | name | ) |
Get the render target for a given render texture name.
|
virtual |
Recursively collect target states (except for final Pass).
| compiledState | This vector will contain a list of TargetOperation objects. |
|
virtual |
Compile the final (output) operation.
This is done separately because this is combined with the input in chained filters.
| Compositor * Ogre::CompositorInstance::getCompositor | ( | ) |
Get Compositor of which this is an instance.
| CompositionTechnique * Ogre::CompositorInstance::getTechnique | ( | ) |
Get CompositionTechnique used by this instance.
| void Ogre::CompositorInstance::setTechnique | ( | CompositionTechnique * | tech, |
| bool | reuseTextures = true |
||
| ) |
Change the technique we're using to render this compositor.
| tech | The technique to use (must be supported and from the same Compositor) |
| reuseTextures | If textures have already been created for the current technique, whether to try to re-use them if sizes & formats match. |
Pick a technique to use to render this compositor based on a scheme.
| schemeName | The scheme to use |
| reuseTextures | If textures have already been created for the current technique, whether to try to re-use them if sizes & formats match. Note that for this feature to be of benefit, the textures must have been created with the 'pooled' option enabled. |
Returns the name of the scheme this compositor is using.
References Ogre::BLANKSTRING.
| void Ogre::CompositorInstance::notifyResized | ( | ) |
Notify this instance that the primary surface has been resized.
| CompositorChain * Ogre::CompositorInstance::getChain | ( | ) |
Get Chain that this instance is part of.
Add a listener.
Listeners provide an interface to "listen in" to to render system operations executed by this CompositorInstance so that materials can be programmatically set up.
Remove a listener.
| void Ogre::CompositorInstance::_fireNotifyMaterialSetup | ( | uint32 | pass_id, |
| MaterialPtr & | mat | ||
| ) |
Notify listeners of a material compilation.
| void Ogre::CompositorInstance::_fireNotifyMaterialRender | ( | uint32 | pass_id, |
| MaterialPtr & | mat | ||
| ) |
Notify listeners of a material render.
Notify listeners of a material render.
Notify listeners ressources.