C# Class Axiom.Graphics.UnifiedHighLevelGpuProgram

Specialization of HighLevelGpuProgram which just delegates its implementation to one other high level program, allowing a single program definition to represent one supported program from a number of options
Whilst you can use Technique to implement several ways to render an object depending on hardware support, if the only reason to need multiple paths is because of the high-level shader language supported, this can be cumbersome. For example you might want to implement the same shader in HLSL and GLSL for portability but apart from the implementation detail, the shaders do the same thing and take the same parameters. If the materials in question are complex, duplicating the techniques just to switch language is not optimal, so instead you can define high-level programs with a syntax of 'unified', and list the actual implementations in order of preference via repeated use of the 'delegate' parameter, which just points at another program name. The first one which has a supported syntax will be used.
Inheritance: Axiom.Graphics.HighLevelGpuProgram
Show file Open project: mono-soc-2011/axiom

Public Methods

Method Description
AddDelegateProgram ( string delegateName ) : void

Adds a new delegate program to the list.

Delegates are tested in order so earlier ones are preferred.

ClearDelegatePrograms ( ) : void

Remove all delegate programs

CreateParameters ( ) : GpuProgramParameters
Load ( bool background ) : void
SetParam ( string name, string val ) : bool

Protected Methods

Method Description
BuildConstantDefinitions ( ) : void
CreateLowLevelImpl ( ) : void
LoadFromSource ( ) : void
PopulateParameterNames ( GpuProgramParameters parms ) : void
UnloadImpl ( ) : void
buildConstantDefinitions ( ) : void
chooseDelegate ( ) : void

Private Methods

Method Description
UnifiedHighLevelGpuProgram ( ResourceManager creator, string name, System.UInt64 handle, string group ) : System
UnifiedHighLevelGpuProgram ( ResourceManager creator, string name, System.UInt64 handle, string group, bool isManual, IManualResourceLoader loader ) : System

Method Details

AddDelegateProgram() public method

Adds a new delegate program to the list.
Delegates are tested in order so earlier ones are preferred.
public AddDelegateProgram ( string delegateName ) : void
delegateName string
return void

BuildConstantDefinitions() protected method

protected BuildConstantDefinitions ( ) : void
return void

ClearDelegatePrograms() public method

Remove all delegate programs
public ClearDelegatePrograms ( ) : void
return void

CreateLowLevelImpl() protected method

protected CreateLowLevelImpl ( ) : void
return void

CreateParameters() public method

public CreateParameters ( ) : GpuProgramParameters
return GpuProgramParameters

Load() public method

public Load ( bool background ) : void
background bool
return void

LoadFromSource() protected method

protected LoadFromSource ( ) : void
return void

PopulateParameterNames() protected method

protected PopulateParameterNames ( GpuProgramParameters parms ) : void
parms GpuProgramParameters
return void

SetParam() public method

public SetParam ( string name, string val ) : bool
name string
val string
return bool

UnloadImpl() protected method

protected UnloadImpl ( ) : void
return void

buildConstantDefinitions() protected method

protected buildConstantDefinitions ( ) : void
return void

chooseDelegate() protected method

protected chooseDelegate ( ) : void
return void