C# Класс 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.

Наследование: Axiom.Graphics.HighLevelGpuProgram
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
UnloadImpl ( ) : void
dispose ( bool disposeManagedResources ) : void

Приватные методы

Метод Описание
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

Описание методов

AttachChildShader() публичный Метод

Attach another GLSL Shader to this one.
public AttachChildShader ( string name ) : void
name string
Результат void

AttachToProgramObject() публичный Метод

public AttachToProgramObject ( int programObject ) : void
programObject int
Результат void

DetachFromProgramObject() публичный Метод

public DetachFromProgramObject ( int programObject ) : void
programObject int
Результат void

GLSLProgram() публичный Метод

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
Результат System

SetParam() публичный Метод

Set a custom param for this high level gpu program.
public SetParam ( string name, string val ) : bool
name string
val string
Результат bool

UnloadImpl() защищенный Метод

protected UnloadImpl ( ) : void
Результат void

dispose() защищенный Метод

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
Результат void