C# Class Axiom.Graphics.CompositorInstance

An instance of a Compositor object for one Viewport. It is part of the CompositorChain for a Viewport.
Inheritance: DisposableObject
ファイルを表示 Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Property Type Description
chain Axiom.Graphics.CompositorChain
compositor Compositor
enabled bool
localTextures Texture>.Dictionary
materialDummyCounter int
previousInstance CompositorInstance
renderSystemOperations List
resourceDummyCounter int
technique CompositionTechnique

Public Methods

Method Description
CompileOutputOperation ( CompositeTargetOperation finalState ) : void

Compile the final (output) operation. This is done seperately because this is combined with the input in chained filters.

CompileTargetOperations ( List compiledState ) : void

Recursively collect target states (except for final Pass).

CompositorInstance ( CompositionTechnique technique, Axiom.Graphics.CompositorChain chain ) : System
CreateResources ( bool forResizeOnly ) : void

Create local rendertextures and other resources. Builds mLocalTextures.

FreeResources ( bool forResizeOnly, bool clearReservedTextures ) : void

Destroy local rendertextures and other resources.

GetTextureInstance ( string name ) : Axiom.Core.Texture

Get the instance for a local texture.

It is only valid to call this when local textures have been loaded, which in practice means that the compositor instance is active. Calling it at other times will cause an exception. Note that since textures are cleaned up aggressively, this name is not guaranteed to stay the same if you disable and renable the compositor instance.

GetTextureInstance ( string name, int mrtIndex ) : Axiom.Core.Texture

Get the instance for a local texture.

It is only valid to call this when local textures have been loaded, which in practice means that the compositor instance is active. Calling it at other times will cause an exception. Note that since textures are cleaned up aggressively, this name is not guaranteed to stay the same if you disable and renable the compositor instance.

OnMaterialRender ( CompositorInstanceMaterialEventArgs args ) : void

Notify listeners of a material render.

OnMaterialSetup ( CompositorInstanceMaterialEventArgs args ) : void

Notify listeners of a material compilation.

OnResourceCreated ( CompositorInstanceResourceEventArgs args ) : void

Notify listeners of a material render.

Protected Methods

Method Description
CollectPasses ( CompositeTargetOperation finalState, CompositionTargetPass target ) : void

Collect rendering passes. Here, passes are converted into render target operations and queued with queueRenderSystemOp.

CreateLocalMaterial ( string name ) : Material

Create a local dummy material with one technique but no passes. The material is detached from the Material Manager to make sure it is destroyed when going out of scope.

QueueRenderSystemOp ( CompositeTargetOperation finalState, CompositeRenderSystemOperation op ) : void

Queue a render system operation.

dispose ( bool disposeManagedResources ) : void

Private Methods

Method Description
DeriveTextureRenderTargetOptions ( string texname, bool &hwGammaWrite, int &fsaa, string &fsaaHint ) : void

Search for options like AA and hardware gamma which we may want to inherit from the main render target to which we're attached.

GetMrtTextureLocalName ( String baseName, int attachment ) : String

Method Details

CollectPasses() protected method

Collect rendering passes. Here, passes are converted into render target operations and queued with queueRenderSystemOp.
protected CollectPasses ( CompositeTargetOperation finalState, CompositionTargetPass target ) : void
finalState CompositeTargetOperation
target CompositionTargetPass
return void

CompileOutputOperation() public method

Compile the final (output) operation. This is done seperately because this is combined with the input in chained filters.
public CompileOutputOperation ( CompositeTargetOperation finalState ) : void
finalState CompositeTargetOperation
return void

CompileTargetOperations() public method

Recursively collect target states (except for final Pass).
public CompileTargetOperations ( List compiledState ) : void
compiledState List This vector will contain a list of TargetOperation objects
return void

CompositorInstance() public method

public CompositorInstance ( CompositionTechnique technique, Axiom.Graphics.CompositorChain chain ) : System
technique CompositionTechnique
chain Axiom.Graphics.CompositorChain
return System

CreateLocalMaterial() protected method

Create a local dummy material with one technique but no passes. The material is detached from the Material Manager to make sure it is destroyed when going out of scope.
protected CreateLocalMaterial ( string name ) : Material
name string
return Material

CreateResources() public method

Create local rendertextures and other resources. Builds mLocalTextures.
public CreateResources ( bool forResizeOnly ) : void
forResizeOnly bool
return void

FreeResources() public method

Destroy local rendertextures and other resources.
public FreeResources ( bool forResizeOnly, bool clearReservedTextures ) : void
forResizeOnly bool
clearReservedTextures bool
return void

GetTextureInstance() public method

Get the instance for a local texture.
It is only valid to call this when local textures have been loaded, which in practice means that the compositor instance is active. Calling it at other times will cause an exception. Note that since textures are cleaned up aggressively, this name is not guaranteed to stay the same if you disable and renable the compositor instance.
public GetTextureInstance ( string name ) : Axiom.Core.Texture
name string The name of the texture in the original compositor definition
return Axiom.Core.Texture

GetTextureInstance() public method

Get the instance for a local texture.
It is only valid to call this when local textures have been loaded, which in practice means that the compositor instance is active. Calling it at other times will cause an exception. Note that since textures are cleaned up aggressively, this name is not guaranteed to stay the same if you disable and renable the compositor instance.
public GetTextureInstance ( string name, int mrtIndex ) : Axiom.Core.Texture
name string The name of the texture in the original compositor definition
mrtIndex int If name identifies a MRT, which texture attachment to retrieve
return Axiom.Core.Texture

OnMaterialRender() public method

Notify listeners of a material render.
public OnMaterialRender ( CompositorInstanceMaterialEventArgs args ) : void
args CompositorInstanceMaterialEventArgs
return void

OnMaterialSetup() public method

Notify listeners of a material compilation.
public OnMaterialSetup ( CompositorInstanceMaterialEventArgs args ) : void
args CompositorInstanceMaterialEventArgs
return void

OnResourceCreated() public method

Notify listeners of a material render.
public OnResourceCreated ( CompositorInstanceResourceEventArgs args ) : void
args CompositorInstanceResourceEventArgs
return void

QueueRenderSystemOp() protected method

Queue a render system operation.
protected QueueRenderSystemOp ( CompositeTargetOperation finalState, CompositeRenderSystemOperation op ) : void
finalState CompositeTargetOperation
op CompositeRenderSystemOperation
return void

dispose() protected method

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
return void

Property Details

chain protected_oe property

Composition chain of which this instance is part
protected CompositorChain,Axiom.Graphics chain
return Axiom.Graphics.CompositorChain

compositor protected_oe property

Compositor of which this is an instance
protected Compositor,Axiom.Graphics compositor
return Compositor

enabled protected_oe property

Is this instance enabled?
protected bool enabled
return bool

localTextures protected_oe property

Map from name->local texture
protected Dictionary localTextures
return Texture>.Dictionary

materialDummyCounter protected_oe static_oe property

protected static int materialDummyCounter
return int

previousInstance protected_oe property

Previous instance (set by chain)
protected CompositorInstance,Axiom.Graphics previousInstance
return CompositorInstance

renderSystemOperations protected_oe property

Render System operations queued by last compile, these are created by this instance thus managed and deleted by it. The list is cleared with clearCompilationState()
protected List renderSystemOperations
return List

resourceDummyCounter protected_oe static_oe property

protected static int resourceDummyCounter
return int

technique protected_oe property

Composition technique used by this instance
protected CompositionTechnique,Axiom.Graphics technique
return CompositionTechnique