| Description | Hierarchy | Fields | Methods | Properties |
type TAd2dShader = class(TObject)
The abstract shader class that is created by a shader system. Istead of using this abstract shader class, you may also use TAdShader from the AdShader unit.
![]() |
procedure LoadProgramFromBuffer(ABuf: PAnsiChar; ASourceType: TAd2dShaderSourceType; AProgramName: PAnsiChar; AShaderType: TAd2dShaderType); virtual; abstract; |
![]() |
procedure Initialize; virtual; abstract; |
![]() |
procedure Finalize; virtual; abstract; |
![]() |
procedure Bind; virtual; abstract; |
![]() |
procedure Unbind; virtual; abstract; |
![]() |
function GetParameter(AName: PAnsiChar): Pointer; virtual; abstract; |
![]() |
procedure SetParameter(AParam: Pointer; AValue: PSingle; ACount: integer); overload; virtual; abstract; |
![]() |
procedure SetParameter(AParam: Pointer; AValue: PInteger; ACount: integer); overload; virtual; abstract; |
![]() |
procedure SetParameter(AParam: Pointer; AValue: TAd2dTexture); overload; virtual; abstract; |
![]() |
property Loaded: boolean read GetLoaded; |
![]() |
procedure LoadProgramFromBuffer(ABuf: PAnsiChar; ASourceType: TAd2dShaderSourceType; AProgramName: PAnsiChar; AShaderType: TAd2dShaderType); virtual; abstract; |
|
Loads a shader program from a buffer. Parameters
| |
![]() |
procedure Initialize; virtual; abstract; |
|
Initializes the shader. This function should be called after the main surface is initialized. | |
![]() |
procedure Finalize; virtual; abstract; |
|
Finalizes the shader. This function should be called before the main surface has been finalized. | |
![]() |
procedure Bind; virtual; abstract; |
|
Activates the shader effect. | |
![]() |
procedure Unbind; virtual; abstract; |
|
Unbinds the shader effect. | |
![]() |
function GetParameter(AName: PAnsiChar): Pointer; virtual; abstract; |
|
Returns the pointer to the parameter with a specific name. | |
![]() |
procedure SetParameter(AParam: Pointer; AValue: PSingle; ACount: integer); overload; virtual; abstract; |
|
Sets a float parameter. | |
![]() |
procedure SetParameter(AParam: Pointer; AValue: PInteger; ACount: integer); overload; virtual; abstract; |
|
Sets a integer parameter. | |
![]() |
procedure SetParameter(AParam: Pointer; AValue: TAd2dTexture); overload; virtual; abstract; |
|
Sets a texture parameter. | |
![]() |
property Loaded: boolean read GetLoaded; |
|
Returns whether the shader is loaded. | |