Class TAd2dShader

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TAd2dShader = class(TObject)

Description

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.

See also
TAd2dShaderSystem
A abstract shader generating class that is exchanged between the graphic plugin and the host application.
TAdShaderSystem
Andorra 2D's main shader system class.
TAdShader
The TAdShader class represents a single vertex or fragment (pixel) shader program in the Andorra 2D application.

Hierarchy

Overview

Methods

Public procedure LoadProgramFromBuffer(ABuf: PAnsiChar; ASourceType: TAd2dShaderSourceType; AProgramName: PAnsiChar; AShaderType: TAd2dShaderType); virtual; abstract;
Public procedure Initialize; virtual; abstract;
Public procedure Finalize; virtual; abstract;
Public procedure Bind; virtual; abstract;
Public procedure Unbind; virtual; abstract;
Public function GetParameter(AName: PAnsiChar): Pointer; virtual; abstract;
Public procedure SetParameter(AParam: Pointer; AValue: PSingle; ACount: integer); overload; virtual; abstract;
Public procedure SetParameter(AParam: Pointer; AValue: PInteger; ACount: integer); overload; virtual; abstract;
Public procedure SetParameter(AParam: Pointer; AValue: TAd2dTexture); overload; virtual; abstract;

Properties

Public property Loaded: boolean read GetLoaded;

Description

Methods

Public procedure LoadProgramFromBuffer(ABuf: PAnsiChar; ASourceType: TAd2dShaderSourceType; AProgramName: PAnsiChar; AShaderType: TAd2dShaderType); virtual; abstract;

Loads a shader program from a buffer.

Parameters
ASourceType
defines the type of the source code: binary or as sourcecode
AProgramName
specifies the name of the program in the shader sourcecode
AShaderType
defines the type of the shader program: a vertex or a fragment shader.
Public procedure Initialize; virtual; abstract;

Initializes the shader. This function should be called after the main surface is initialized.

Public procedure Finalize; virtual; abstract;

Finalizes the shader. This function should be called before the main surface has been finalized.

Public procedure Bind; virtual; abstract;

Activates the shader effect.

Public procedure Unbind; virtual; abstract;

Unbinds the shader effect.

Public function GetParameter(AName: PAnsiChar): Pointer; virtual; abstract;

Returns the pointer to the parameter with a specific name.

Public procedure SetParameter(AParam: Pointer; AValue: PSingle; ACount: integer); overload; virtual; abstract;

Sets a float parameter.

Public procedure SetParameter(AParam: Pointer; AValue: PInteger; ACount: integer); overload; virtual; abstract;

Sets a integer parameter.

Public procedure SetParameter(AParam: Pointer; AValue: TAd2dTexture); overload; virtual; abstract;

Sets a texture parameter.

Properties

Public property Loaded: boolean read GetLoaded;

Returns whether the shader is loaded.

SourceForge.net Logo


Generated by PasDoc 0.11.0 on 2008-12-31 14:32:00