Go to the documentation of this file.
28 #ifndef __CompositorInstance_H__
29 #define __CompositorInstance_H__
118 target(inTarget), currentQueueGroupID(0), visibilityMask(0xFFFFFFFF),
120 onlyInitial(false), hasBeenRendered(false), findVisibleObjects(false),
121 materialScheme(
MaterialManager::DEFAULT_SCHEME_NAME), shadowsEnabled(true)
380 bool *hwGammaWrite,
uint *fsaa,
String* fsaaHint);
394 #endif // __CompositorInstance_H__
void notifyCameraChanged(Camera *camera)
Notify this instance that the primary viewport's camera has changed.
RenderTarget * getTargetForTex(const String &name)
Get RenderTarget for a named local texture.
void setTechnique(CompositionTechnique *tech, bool reuseTextures=true)
Change the technique we're using to render this compositor.
const size_t RENDER_QUEUE_COUNT
void deriveTextureRenderTargetOptions(const String &texname, bool *hwGammaWrite, uint *fsaa, String *fsaaHint)
Search for options like AA and hardware gamma which we may want to inherit from the main render targe...
Defines the functionality of a 3D API.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
map< int, MaterialPtr >::type QuadMaterialMap
virtual void execute(SceneManager *sm, RenderSystem *rs)=0
Set state to SceneManager and RenderSystem.
map< String, MultiRenderTarget * >::type LocalMRTMap
Store a list of MRTs we've created.
void setAlive(bool value)
Set alive/active flag.
A viewpoint from which the scene will be rendered.
Class representing a Compositor object.
const String & getSourceForTex(const String &name, size_t mrtIndex=0)
Get source texture name for a named local texture.
Chain of compositor effects applying to one viewport.
std::pair< int, RenderSystemOperation * > RenderSystemOpPair
void createResources(bool forResizeOnly)
Create local rendertextures and other resources.
void _fireNotifyResourcesCreated(bool forResizeOnly)
Notify listeners of a material render.
bool hasBeenRendered
"Has been rendered" flag; used in combination with onlyInitial to determine whether to skip this targ...
Class for managing Material settings for Ogre.
void _fireNotifyMaterialSetup(uint32 pass_id, MaterialPtr &mat)
Notify listeners of a material compilation.
const String & getTextureInstanceName(const String &name, size_t mrtIndex)
Get the instance name for a local texture.
void addListener(Listener *l)
Add a listener.
CompositorInstance(CompositionTechnique *technique, CompositorChain *chain)
bool getEnabled() const
Get enabled flag.
ReserveTextureMap mReserveTextures
Textures that are not currently in use, but that we want to keep for now, for example if we switch te...
Operation setup for a RenderTarget (collected).
Base composition technique, can be subclassed in plugins.
virtual ~RenderSystemOperation()
String getMRTTexLocalName(const String &baseName, size_t attachment)
Util method for assigning a local texture name to a MRT attachment.
CompositorInstance * mPreviousInstance
Previous instance (set by chain).
CompositorChain * getChain()
Get Chain that this instance is part of.
bool findVisibleObjects
Whether this op needs to find visible scene objects or not.
RenderTarget * getRenderTarget(const String &name)
Get the render target for a given render texture name.
virtual void _compileTargetOperations(CompiledState &compiledState)
Recursively collect target states (except for final Pass).
RenderSystemOpPairs renderSystemOperations
RenderSystem operations to queue into the scene manager, by uint8.
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
@ RENDER_QUEUE_MAX
Final possible render queue, don't exceed this.
void removeListener(Listener *l)
Remove a listener.
RenderTarget * target
Target.
virtual void notifyMaterialSetup(uint32 pass_id, MaterialPtr &mat)
Notification of when a render target operation involving a material (like rendering a quad) is compil...
A 'canvas' which can receive the results of a rendering operation.
Manages the organisation and rendering of a 'scene' i.e.
Object representing one render to a RenderTarget or Viewport in the Ogre Composition framework.
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.
virtual void notifyMaterialRender(uint32 pass_id, MaterialPtr &mat)
Notification before a render target operation involving a material (like rendering a quad),...
CompositionTechnique * getTechnique()
Get CompositionTechnique used by this instance.
bool shadowsEnabled
Whether shadows will be enabled.
bool mEnabled
Is this instance enabled?
TargetOperation(RenderTarget *inTarget)
virtual void notifyResourcesCreated(bool forResizeOnly)
Notification after resources have been created (or recreated).
MaterialPtr createLocalMaterial(const String &srcName)
Create a local dummy material with one technique but no passes.
map< CompositionTechnique::TextureDefinition *, TexturePtr >::type ReserveTextureMap
map< String, TexturePtr >::type LocalTextureMap
Map from name->local texture.
Specific render system operation.
String materialScheme
Which material scheme this op will use.
void _fireNotifyMaterialRender(uint32 pass_id, MaterialPtr &mat)
Notify listeners of a material render.
bool mAlive
Is this instance allocating resources?
Provides an interface to "listen in" to to render system operations executed by this CompositorInstan...
TexturePtr getTextureInstance(const String &name, size_t mrtIndex)
Get the instance of a local texture.
std::map< K, V, P, A > type
vector< TargetOperation >::type CompiledState
virtual void _compileOutputOperation(TargetOperation &finalState)
Compile the final (output) operation.
CompositionTechnique * mTechnique
Composition technique used by this instance.
std::bitset< RENDER_QUEUE_COUNT > RenderQueueBitSet
A set of render queues to either include or exclude certain render queues.
virtual void collectPasses(TargetOperation &finalState, CompositionTargetPass *target)
Collect rendering passes.
virtual ~CompositorInstance()
Compositor * mCompositor
Compositor of which this is an instance.
uint32 visibilityMask
Scene visibility mask If this is 0, the scene is not rendered at all.
void notifyResized()
Notify this instance that the primary surface has been resized.
int currentQueueGroupID
Current group ID.
vector< RenderSystemOpPair >::type RenderSystemOpPairs
void queueRenderSystemOp(TargetOperation &finalState, RenderSystemOperation *op)
Queue a render system operation.
vector< Listener * >::type Listeners
Vector of listeners.
An instance of a Compositor object for one Viewport.
CompositorChain * mChain
Composition chain of which this instance is part.
bool getAlive() const
Get alive flag.
Compositor * getCompositor()
Get Compositor of which this is an instance.
LocalTextureMap mLocalTextures
RenderQueueBitSet renderQueues
Which renderqueues to render from scene.
void freeResources(bool forResizeOnly, bool clearReserveTextures)
Destroy local rendertextures and other resources.
const String & getScheme() const
Returns the name of the scheme this compositor is using.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.