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
Afficher le fichier Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Свойство Type Description
chain Axiom.Graphics.CompositorChain
compositor Compositor
enabled bool
localTextures Texture>.Dictionary
materialDummyCounter int
previousInstance CompositorInstance
renderSystemOperations List
resourceDummyCounter int
technique CompositionTechnique

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

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
Résultat void

CompileOutputOperation() public méthode

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
Résultat void

CompileTargetOperations() public méthode

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

CompositorInstance() public méthode

public CompositorInstance ( CompositionTechnique technique, Axiom.Graphics.CompositorChain chain ) : System
technique CompositionTechnique
chain Axiom.Graphics.CompositorChain
Résultat System

CreateLocalMaterial() protected méthode

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
Résultat Material

CreateResources() public méthode

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

FreeResources() public méthode

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

GetTextureInstance() public méthode

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
Résultat Axiom.Core.Texture

GetTextureInstance() public méthode

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
Résultat Axiom.Core.Texture

OnMaterialRender() public méthode

Notify listeners of a material render.
public OnMaterialRender ( CompositorInstanceMaterialEventArgs args ) : void
args CompositorInstanceMaterialEventArgs
Résultat void

OnMaterialSetup() public méthode

Notify listeners of a material compilation.
public OnMaterialSetup ( CompositorInstanceMaterialEventArgs args ) : void
args CompositorInstanceMaterialEventArgs
Résultat void

OnResourceCreated() public méthode

Notify listeners of a material render.
public OnResourceCreated ( CompositorInstanceResourceEventArgs args ) : void
args CompositorInstanceResourceEventArgs
Résultat void

QueueRenderSystemOp() protected méthode

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

dispose() protected méthode

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
Résultat void

Property Details

chain protected_oe property

Composition chain of which this instance is part
protected CompositorChain,Axiom.Graphics chain
Résultat Axiom.Graphics.CompositorChain

compositor protected_oe property

Compositor of which this is an instance
protected Compositor,Axiom.Graphics compositor
Résultat Compositor

enabled protected_oe property

Is this instance enabled?
protected bool enabled
Résultat bool

localTextures protected_oe property

Map from name->local texture
protected Dictionary localTextures
Résultat Texture>.Dictionary

materialDummyCounter protected_oe static_oe property

protected static int materialDummyCounter
Résultat int

previousInstance protected_oe property

Previous instance (set by chain)
protected CompositorInstance,Axiom.Graphics previousInstance
Résultat 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
Résultat List

resourceDummyCounter protected_oe static_oe property

protected static int resourceDummyCounter
Résultat int

technique protected_oe property

Composition technique used by this instance
protected CompositionTechnique,Axiom.Graphics technique
Résultat CompositionTechnique