C# Class Axiom.RenderSystems.OpenGL.GLSL.GLSLProgram

Specialisation of HighLevelGpuProgram to provide support for OpenGL Shader Language (GLSL).
GLSL has no target assembler or entry point specification like DirectX 9 HLSL. Vertex and Fragment shaders only have one entry point called "main". When a shader is compiled, microcode is generated but can not be accessed by the application. GLSL also does not provide assembler low level output after compiling. The GL Render system assumes that the Gpu program is a GL Gpu program so GLSLProgram will create a GLSLGpuProgram that is subclassed from GLGpuProgram for the low level implementation. The GLSLProgram class will create a shader object and compile the source but will not create a program object. It's up to GLSLGpuProgram class to request a program object to link the shader object to.

GLSL supports multiple modular shader objects that can be attached to one program object to form a single shader. This is supported through the "attach" material script command. All the modules to be attached are listed on the same line as the attach command seperated by white space.

Inheritance: Axiom.Graphics.HighLevelGpuProgram
Exibir arquivo Open project: mono-soc-2011/axiom Class Usage Examples

Public Methods

Method Description
AttachChildShader ( string name ) : void

Attach another GLSL Shader to this one.

AttachToProgramObject ( int programObject ) : void

DetachFromProgramObject ( int programObject ) : void

GLSLProgram ( ResourceManager parent, string name, System.UInt64 handle, string group, bool isManual, IManualResourceLoader loader ) : System

Constructor.

SetParam ( string name, string val ) : bool

Set a custom param for this high level gpu program.

Protected Methods

Method Description
UnloadImpl ( ) : void
dispose ( bool disposeManagedResources ) : void

Private Methods

Method Description
BuildConstantDefinitions ( ) : void
Compile ( bool checkErrors = true ) : bool
CreateLowLevelImpl ( ) : void
GLSLProgram ( ) : System
LoadFromSource ( ) : void
OperationTypeToString ( OperationType val ) : String
ParseOperationType ( String val ) : OperationType
PopulateParameterNames ( GpuProgramParameters parms ) : void
RegisterCommands ( ) : void

Axiom internal: registers all commands for IConfigurable dispatch

Method Details

AttachChildShader() public method

Attach another GLSL Shader to this one.
public AttachChildShader ( string name ) : void
name string
return void

AttachToProgramObject() public method

public AttachToProgramObject ( int programObject ) : void
programObject int
return void

DetachFromProgramObject() public method

public DetachFromProgramObject ( int programObject ) : void
programObject int
return void

GLSLProgram() public method

Constructor.
public GLSLProgram ( 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

SetParam() public method

Set a custom param for this high level gpu program.
public SetParam ( string name, string val ) : bool
name string
val string
return bool

UnloadImpl() protected method

protected UnloadImpl ( ) : void
return void

dispose() protected method

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
return void