C# Class Axiom.Graphics.GpuProgramManager

Summary description for GpuProgramManager.
Inheritance: Axiom.Core.ResourceManager
Mostra file Open project: WolfgangSt/axiom Class Usage Examples

Public Methods

Method Description
Create ( string name, string group, GpuProgramType type, string syntaxCode ) : Axiom.Graphics.GpuProgram

Creates a new GpuProgram.

Create ( string name, string group, GpuProgramType type, string syntaxCode, bool isManual, IManualResourceLoader loader ) : Axiom.Graphics.GpuProgram

Creates a new GpuProgram.

CreateParameters ( ) : GpuProgramParameters

Creates a new GpuProgramParameters instance which can be used to bind parameters to your programs.

Program parameters can be shared between multiple programs if you wish.

CreateProgram ( string name, string group, string fileName, GpuProgramType type, string syntaxCode ) : Axiom.Graphics.GpuProgram

Create a new, unloaded GpuProgram from a file of assembly.

Use this method in preference to the 'load' methods if you wish to define a GpuProgram, but not load it yet; useful for saving memory.

CreateProgramFromString ( string name, string group, string source, GpuProgramType type, string syntaxCode ) : Axiom.Graphics.GpuProgram

Create a new, unloaded GpuProgram from a string of assembly code.

Use this method in preference to the 'load' methods if you wish to define a GpuProgram, but not load it yet; useful for saving memory.

GetByName ( string name ) : Axiom.Graphics.GpuProgram

Gets a GpuProgram with the specified name.

IsSyntaxSupported ( string syntaxCode ) : bool

Returns whether a given syntax code (e.g. "ps_1_3", "fp20", "arbvp1") is supported.

Load ( string name, string group, string fileName, GpuProgramType type, string syntaxCode ) : Axiom.Graphics.GpuProgram

Loads a GPU program from a file of assembly.

This method creates a new program of the type specified as the second parameter. As with all types of ResourceManager, this class will search for the file in all resource locations it has been configured to look in.

LoadFromString ( string name, string group, string source, GpuProgramType type, string syntaxCode ) : Axiom.Graphics.GpuProgram

Loads a GPU program from a string containing the assembly source.

This method creates a new program of the type specified as the second parameter. As with all types of ResourceManager, this class will search for the file in all resource locations it has been configured to look in.

LoadMicrocodeCache ( System stream ) : void
SaveMicrocodeCache ( System stream ) : void

Protected Methods

Method Description
GpuProgramManager ( ) : System.Collections.Generic

Internal constructor. This class cannot be instantiated externally.

Protected internal because this singleton will actually hold the instance of a subclass created by a render system plugin.

_create ( string name, System.UInt64 handle, string group, bool isManual, IManualResourceLoader loader, GpuProgramType type, string syntaxCode ) : Axiom.Core.Resource

Internal method for created programs, must be implemented by subclasses

dispose ( bool disposeManagedResources ) : void

Called when the engine is shutting down.

Method Details

Create() public method

Creates a new GpuProgram.
public Create ( string name, string group, GpuProgramType type, string syntaxCode ) : Axiom.Graphics.GpuProgram
name string /// Name of the program to create. ///
group string
type GpuProgramType /// Type of the program to create, i.e. vertex or fragment. ///
syntaxCode string /// Syntax of the program, i.e. vs_1_1, arbvp1, etc. ///
return Axiom.Graphics.GpuProgram

Create() public method

Creates a new GpuProgram.
public Create ( string name, string group, GpuProgramType type, string syntaxCode, bool isManual, IManualResourceLoader loader ) : Axiom.Graphics.GpuProgram
name string /// Name of the program to create. ///
group string
type GpuProgramType /// Type of the program to create, i.e. vertex or fragment. ///
syntaxCode string /// Syntax of the program, i.e. vs_1_1, arbvp1, etc. ///
isManual bool
loader IManualResourceLoader
return Axiom.Graphics.GpuProgram

CreateParameters() public method

Creates a new GpuProgramParameters instance which can be used to bind parameters to your programs.
Program parameters can be shared between multiple programs if you wish.
public CreateParameters ( ) : GpuProgramParameters
return GpuProgramParameters

CreateProgram() public method

Create a new, unloaded GpuProgram from a file of assembly.
Use this method in preference to the 'load' methods if you wish to define a GpuProgram, but not load it yet; useful for saving memory.
public CreateProgram ( string name, string group, string fileName, GpuProgramType type, string syntaxCode ) : Axiom.Graphics.GpuProgram
name string /// The name of the program. ///
group string
fileName string /// The file to load. ///
type GpuProgramType
syntaxCode string /// Name of the syntax to use for the program, i.e. vs_1_1, arbvp1, etc. ///
return Axiom.Graphics.GpuProgram

CreateProgramFromString() public method

Create a new, unloaded GpuProgram from a string of assembly code.
Use this method in preference to the 'load' methods if you wish to define a GpuProgram, but not load it yet; useful for saving memory.
public CreateProgramFromString ( string name, string group, string source, GpuProgramType type, string syntaxCode ) : Axiom.Graphics.GpuProgram
name string /// The name of the program. ///
group string
source string /// The asm source of the program to create. ///
type GpuProgramType
syntaxCode string /// Name of the syntax to use for the program, i.e. vs_1_1, arbvp1, etc. ///
return Axiom.Graphics.GpuProgram

GetByName() public method

Gets a GpuProgram with the specified name.
public GetByName ( string name ) : Axiom.Graphics.GpuProgram
name string
return Axiom.Graphics.GpuProgram

GpuProgramManager() protected method

Internal constructor. This class cannot be instantiated externally.
Protected internal because this singleton will actually hold the instance of a subclass created by a render system plugin.
protected GpuProgramManager ( ) : System.Collections.Generic
return System.Collections.Generic

IsSyntaxSupported() public method

Returns whether a given syntax code (e.g. "ps_1_3", "fp20", "arbvp1") is supported.
public IsSyntaxSupported ( string syntaxCode ) : bool
syntaxCode string
return bool

Load() public method

Loads a GPU program from a file of assembly.
This method creates a new program of the type specified as the second parameter. As with all types of ResourceManager, this class will search for the file in all resource locations it has been configured to look in.
public Load ( string name, string group, string fileName, GpuProgramType type, string syntaxCode ) : Axiom.Graphics.GpuProgram
name string /// Identifying name of the program to load. ///
group string
fileName string /// The file to load. ///
type GpuProgramType /// Type of program to create. ///
syntaxCode string /// Syntax code of the program, i.e. vs_1_1, arbvp1, etc. ///
return Axiom.Graphics.GpuProgram

LoadFromString() public method

Loads a GPU program from a string containing the assembly source.
This method creates a new program of the type specified as the second parameter. As with all types of ResourceManager, this class will search for the file in all resource locations it has been configured to look in.
public LoadFromString ( string name, string group, string source, GpuProgramType type, string syntaxCode ) : Axiom.Graphics.GpuProgram
name string /// Name used to identify this program. ///
group string
source string /// Source code of the program to load. ///
type GpuProgramType /// Type of program to create. ///
syntaxCode string /// Syntax code of the program, i.e. vs_1_1, arbvp1, etc. ///
return Axiom.Graphics.GpuProgram

LoadMicrocodeCache() public method

public LoadMicrocodeCache ( System stream ) : void
stream System
return void

SaveMicrocodeCache() public method

public SaveMicrocodeCache ( System stream ) : void
stream System
return void

_create() protected abstract method

Internal method for created programs, must be implemented by subclasses
protected abstract _create ( string name, System.UInt64 handle, string group, bool isManual, IManualResourceLoader loader, GpuProgramType type, string syntaxCode ) : Axiom.Core.Resource
name string Name of the program to create.
handle System.UInt64 Handle of the program
group string resource group of the program
isManual bool is this program manually created
loader IManualResourceLoader The ManualResourceLoader if this program is manually loaded
type GpuProgramType Type of the program to create, i.e. vertex or fragment.
syntaxCode string Syntax of the program, i.e. vs_1_1, arbvp1, etc.
return Axiom.Core.Resource

dispose() protected method

Called when the engine is shutting down.
protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
return void