C# Class Axiom.Graphics.Compositor

Class representing a Compositor object. Compositors provide the means to flexibly "composite" the final rendering result from multiple scene renders and intermediate operations like rendering fullscreen quads. This makes it possible to apply postfilter effects, HDRI postprocessing, and shadow effects to a Viewport.
Inheritance: Axiom.Core.Resource
Show file Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Property Type Description
autoNumber int
compilationRequired bool
globalMRTs MultiRenderTarget>.Dictionary
globalTextures Texture>.Dictionary
supportedTechniques List
techniques List

Public Methods

Method Description
Compositor ( ResourceManager parent, string name, System.UInt64 handle, string group, bool isManual, IManualResourceLoader loader ) : System
CreateTechnique ( ) : CompositionTechnique

Create a new technique, and return a pointer to it.

GetMRTLocalName ( string baseName, int attachment ) : string

GetRenderTarget ( string name ) : RenderTarget

Get's the render target for a given render texture name.

You can use this to add listeners etc, but do not use it to update the targets manually or any other modifications, the compositor instance is in charge of this.

GetSupportedTechniqueByScheme ( ) : CompositionTechnique

Get a reference to a supported technique for a given scheme.

GetSupportedTechniqueByScheme ( string schemeName ) : CompositionTechnique

Get a reference to a supported technique for a given scheme.

If there is no specific supported technique with this scheme name, then the first supported technique with no specific scheme will be returned.

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

Get's the instance of a global texture.

RemoveAllTechniques ( ) : void

Remove all techniques.

RemoveTechnique ( int idx ) : void

Remove a technique.

Touch ( ) : void

Overridden to ensure a recompile occurs if needed before use.

Protected Methods

Method Description
Compile ( ) : void

Check supportedness of techniques.

dispose ( bool disposeManagedResources ) : void

Disposes of any resources used by this object.

load ( ) : void

Overridden from Resource.

By default, Materials are not loaded, and adding additional textures etc do not cause those textures to be loaded. When the Load method is called, all textures are loaded (if they are not already), GPU programs are created if applicable, and Controllers are instantiated. Once a material has been loaded, all changes made to it are immediately loaded too

unload ( ) : void

Unloads the material, frees resources etc. Resource

Private Methods

Method Description
CreateGlobalTextures ( ) : void

Create global rendertextures.

FreeGlobalTextures ( ) : void

Destroy global rendertextures.

Method Details

Compile() protected method

Check supportedness of techniques.
protected Compile ( ) : void
return void

Compositor() public method

public Compositor ( ResourceManager parent, string name, System.UInt64 handle, string group, bool isManual, IManualResourceLoader loader ) : System
parent Axiom.Core.ResourceManager
name string
handle System.UInt64
group string
isManual bool
loader IManualResourceLoader
return System

CreateTechnique() public method

Create a new technique, and return a pointer to it.
public CreateTechnique ( ) : CompositionTechnique
return CompositionTechnique

GetMRTLocalName() public method

public GetMRTLocalName ( string baseName, int attachment ) : string
baseName string
attachment int
return string

GetRenderTarget() public method

Get's the render target for a given render texture name.
You can use this to add listeners etc, but do not use it to update the targets manually or any other modifications, the compositor instance is in charge of this.
public GetRenderTarget ( string name ) : RenderTarget
name string name of the texture
return RenderTarget

GetSupportedTechniqueByScheme() public method

Get a reference to a supported technique for a given scheme.
public GetSupportedTechniqueByScheme ( ) : CompositionTechnique
return CompositionTechnique

GetSupportedTechniqueByScheme() public method

Get a reference to a supported technique for a given scheme.
If there is no specific supported technique with this scheme name, then the first supported technique with no specific scheme will be returned.
public GetSupportedTechniqueByScheme ( string schemeName ) : CompositionTechnique
schemeName string The scheme name you are looking for. /// Blank means to look for techniques with no scheme associated ///
return CompositionTechnique

GetTextureInstance() public method

Get's the instance of a global texture.
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

RemoveAllTechniques() public method

Remove all techniques.
public RemoveAllTechniques ( ) : void
return void

RemoveTechnique() public method

Remove a technique.
public RemoveTechnique ( int idx ) : void
idx int
return void

Touch() public method

Overridden to ensure a recompile occurs if needed before use.
public Touch ( ) : void
return void

dispose() protected method

Disposes of any resources used by this object.
protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
return void

load() protected method

Overridden from Resource.
By default, Materials are not loaded, and adding additional textures etc do not cause those textures to be loaded. When the Load method is called, all textures are loaded (if they are not already), GPU programs are created if applicable, and Controllers are instantiated. Once a material has been loaded, all changes made to it are immediately loaded too
protected load ( ) : void
return void

unload() protected method

Unloads the material, frees resources etc. Resource
protected unload ( ) : void
return void

Property Details

autoNumber protected static property

Auto incrementing number for creating unique names.
protected static int autoNumber
return int

compilationRequired protected property

This is set if the techniques change and the supportedness of techniques has to be re-evaluated.
protected bool compilationRequired
return bool

globalMRTs protected property

Store a list of MRTs we've created
protected Dictionary globalMRTs
return MultiRenderTarget>.Dictionary

globalTextures protected property

Store a list of textures we've created
protected Dictionary globalTextures
return Texture>.Dictionary

supportedTechniques protected property

protected List supportedTechniques
return List

techniques protected property

protected List techniques
return List