C# Class Axiom.CgPrograms.CgProgram

Specialization of HighLevelGpuProgram to provide support for nVidia's Cg language.
Cg can be used to compile common, high-level, C-like code down to assembler language for both GL and Direct3D, for multiple graphics cards. You must supply a list of profiles which your program must support using SetProfiles() before the program is loaded in order for this to work. The program will then negotiate with the renderer to compile the appropriate program for the API and graphics card capabilities.
Inheritance: Axiom.Graphics.HighLevelGpuProgram
Afficher le fichier Open project: mono-soc-2011/axiom

Protected Properties

Свойство Type Description
cgContext System.IntPtr
cgProgram System.IntPtr
entry string
profiles string[]
selectedCgProfile int
selectedProfile string

Méthodes publiques

Méthode Description
CgProgram ( ResourceManager parent, string name, ulong handle, string group, bool isManual, IManualResourceLoader loader, IntPtr context ) : System

Constructor.

SetParam ( string name, string val ) : bool

Method for passing parameters into the CgProgram.

Touch ( ) : void

Only bother with supported programs.

Méthodes protégées

Méthode Description
BuildConstantDefinitions ( ) : void
CreateLowLevelImpl ( ) : void

Create as assembler program from the compiled source supplied by the Cg compiler.

LoadFromSource ( ) : void

PopulateParameterNames ( GpuProgramParameters parms ) : void

SelectProfile ( ) : void

Internal method which works out which profile to use for this program

UnloadImpl ( ) : void

Unloads the Cg program.

Method Details

BuildConstantDefinitions() protected méthode

protected BuildConstantDefinitions ( ) : void
Résultat void

CgProgram() public méthode

Constructor.
public CgProgram ( ResourceManager parent, string name, ulong handle, string group, bool isManual, IManualResourceLoader loader, IntPtr context ) : System
parent Axiom.Core.ResourceManager
name string Name of this program.
handle ulong
group string
isManual bool
loader IManualResourceLoader
context System.IntPtr CG context id.
Résultat System

CreateLowLevelImpl() protected méthode

Create as assembler program from the compiled source supplied by the Cg compiler.
protected CreateLowLevelImpl ( ) : void
Résultat void

LoadFromSource() protected méthode

protected LoadFromSource ( ) : void
Résultat void

PopulateParameterNames() protected méthode

protected PopulateParameterNames ( GpuProgramParameters parms ) : void
parms Axiom.Graphics.GpuProgramParameters
Résultat void

SelectProfile() protected méthode

Internal method which works out which profile to use for this program
protected SelectProfile ( ) : void
Résultat void

SetParam() public méthode

Method for passing parameters into the CgProgram.
public SetParam ( string name, string val ) : bool
name string /// Param name. ///
val string /// Param value. ///
Résultat bool

Touch() public méthode

Only bother with supported programs.
public Touch ( ) : void
Résultat void

UnloadImpl() protected méthode

Unloads the Cg program.
protected UnloadImpl ( ) : void
Résultat void

Property Details

cgContext protected_oe property

Current Cg context id.
protected IntPtr,System cgContext
Résultat System.IntPtr

cgProgram protected_oe property

Current Cg program id.
protected IntPtr,System cgProgram
Résultat System.IntPtr

entry protected_oe property

Entry point of the Cg program.
protected string entry
Résultat string

profiles protected_oe property

List of requested profiles for this program.
protected string[] profiles
Résultat string[]

selectedCgProfile protected_oe property

protected int selectedCgProfile
Résultat int

selectedProfile protected_oe property

Chosen profile for this program.
protected string selectedProfile
Résultat string