Gorilla.Context.Shader
Unit Gorilla.Context.Shader.pasClasses
- TShaderProgram = class ( TObject )
Enumerations
- enum TContextShaderVariableKindEx = ( Float, Float2, Float3, Vector, Matrix, Texture, Int4Byte, Int4ByteArr, StructArr ) ;
Constants
Functions / Procedures
TShaderProgram
Defines a shader program in the specific context.
Remarks
It needs a vertext shader (VS) and pixel shader (PS) to initialize.Ancestors
Members
Fields
- private FContextClass :
TClass
- private FVS :
NativeUInt
- private FPS :
NativeUInt
- private FProg :
NativeUInt
- private FVariables :
TContextShaderVariables
Methods
- public constructor Create ( const AContextClass : TClass; const VS : TContextShader; const PS : TContextShader ) ;
- public destructor Destroy ( ) ;
- private procedure DoInitialize
(
const
VS :
TContextShader; const
PS :
TContextShader
)
;
virtual;
Initializes the shader program by creating a program in GPU and applying the vertex and pixel shader to it. It also registeres all shader variables in GPU shader program.
- public function Available
(
)
: Boolean
;
Checks if all handles are available and shader code got compiled
- public procedure Use
(
)
;
virtual;
Activates a shader program for usage.
- public procedure ActivateDefault ( ) ; class virtual;