Class TBGLCustomLighting

Unit

Declaration

type TBGLCustomLighting = class(TObject)

Description

Abstract class for lighting with OpenGL

Hierarchy

Overview

Fields

Public ShaderList: TStringList;

Methods

Public destructor Destroy; override;
Public function AddDirectionalLight(AColor: TColorF; ADirection: TPoint3D): integer; virtual; abstract;
Public function AddPointLight(AColor: TColorF; APosition: TPoint3D; ALinearAttenuation, AQuadraticAttenuation: single): integer; virtual; abstract;
Public function GetAttribVariable(AProgram: LongWord; AName: string): LongWord; virtual; abstract;
Public function GetUniformVariable(AProgram: LongWord; AName: string): LongWord; virtual; abstract;
Public function MakeFragmentShader(ASource: string): LongWord; virtual; abstract;
Public function MakeShaderProgram(AVertexShader, AFragmentShader: LongWord): LongWord; virtual; abstract;
Public function MakeVertexShader(ASource: string): LongWord; virtual; abstract;
Public function RemoveLight(AIndex: integer): boolean; virtual; abstract;
Protected function GetAmbiantLightF: TColorF; virtual; abstract;
Protected function GetBuiltInLightingEnabled: boolean; virtual; abstract;
Protected function GetShader(AName: string): TBGLCustomShader;
Protected function GetSupportShaders: boolean; virtual;
Public procedure BindAttribute(AAttribute: TAttributeVariable); virtual; abstract;
Public procedure ClearLights; virtual; abstract;
Public procedure DeleteShaderObject(AShader: LongWord); virtual; abstract;
Public procedure DeleteShaderProgram(AProgram: LongWord); virtual; abstract;
Public procedure FreeShaders;
Public procedure SetSpecularIndex(AIndex: integer); virtual; abstract;
Public procedure SetUniformInteger(AVariable: LongWord; const AValue; AElementCount, AComponentCount: integer); virtual; abstract;
Public procedure SetUniformSingle(AVariable: LongWord; const AValue; AElementCount, AComponentCount: integer); virtual; abstract;
Public procedure UnbindAttribute(AAttribute: TAttributeVariable); virtual; abstract;
Public procedure UseProgram(AProgram: LongWord); virtual; abstract;
Protected procedure SetAmbiantLightF(AAmbiantLight: TColorF); virtual; abstract;
Protected procedure SetBuiltInLightingEnabled(AValue: boolean); virtual; abstract;
Protected procedure SetShader(AName: string; AValue: TBGLCustomShader);

Properties

Public property ActiveShader: TBGLCustomShader read GetActiveShader write SetActiveShader;
Public property AmbiantLightF: TColorF read GetAmbiantLightF write SetAmbiantLightF;
Public property BuiltInLightingEnabled: boolean read GetBuiltInLightingEnabled write SetBuiltInLightingEnabled;
Public property Shader[AName: string]: TBGLCustomShader read GetShader write SetShader;
Public property SupportShaders: boolean read GetSupportShaders;

Description

Fields

Public ShaderList: TStringList;

This item has no description.

Methods

Public destructor Destroy; override;

This item has no description.

Public function AddDirectionalLight(AColor: TColorF; ADirection: TPoint3D): integer; virtual; abstract;

This item has no description.

Public function AddPointLight(AColor: TColorF; APosition: TPoint3D; ALinearAttenuation, AQuadraticAttenuation: single): integer; virtual; abstract;

This item has no description.

Public function GetAttribVariable(AProgram: LongWord; AName: string): LongWord; virtual; abstract;

This item has no description.

Public function GetUniformVariable(AProgram: LongWord; AName: string): LongWord; virtual; abstract;

This item has no description.

Public function MakeFragmentShader(ASource: string): LongWord; virtual; abstract;

This item has no description.

Public function MakeShaderProgram(AVertexShader, AFragmentShader: LongWord): LongWord; virtual; abstract;

This item has no description.

Public function MakeVertexShader(ASource: string): LongWord; virtual; abstract;

This item has no description.

Public function RemoveLight(AIndex: integer): boolean; virtual; abstract;

This item has no description.

Protected function GetAmbiantLightF: TColorF; virtual; abstract;

This item has no description.

Protected function GetBuiltInLightingEnabled: boolean; virtual; abstract;

This item has no description.

Protected function GetShader(AName: string): TBGLCustomShader;

This item has no description.

Protected function GetSupportShaders: boolean; virtual;

This item has no description.

Public procedure BindAttribute(AAttribute: TAttributeVariable); virtual; abstract;

This item has no description.

Public procedure ClearLights; virtual; abstract;

This item has no description.

Public procedure DeleteShaderObject(AShader: LongWord); virtual; abstract;

This item has no description.

Public procedure DeleteShaderProgram(AProgram: LongWord); virtual; abstract;

This item has no description.

Public procedure FreeShaders;

This item has no description.

Public procedure SetSpecularIndex(AIndex: integer); virtual; abstract;

This item has no description.

Public procedure SetUniformInteger(AVariable: LongWord; const AValue; AElementCount, AComponentCount: integer); virtual; abstract;

This item has no description.

Public procedure SetUniformSingle(AVariable: LongWord; const AValue; AElementCount, AComponentCount: integer); virtual; abstract;

This item has no description.

Public procedure UnbindAttribute(AAttribute: TAttributeVariable); virtual; abstract;

This item has no description.

Public procedure UseProgram(AProgram: LongWord); virtual; abstract;

This item has no description.

Protected procedure SetAmbiantLightF(AAmbiantLight: TColorF); virtual; abstract;

This item has no description.

Protected procedure SetBuiltInLightingEnabled(AValue: boolean); virtual; abstract;

This item has no description.

Protected procedure SetShader(AName: string; AValue: TBGLCustomShader);

This item has no description.

Properties

Public property ActiveShader: TBGLCustomShader read GetActiveShader write SetActiveShader;

This item has no description.

Public property AmbiantLightF: TColorF read GetAmbiantLightF write SetAmbiantLightF;

This item has no description.

Public property BuiltInLightingEnabled: boolean read GetBuiltInLightingEnabled write SetBuiltInLightingEnabled;

This item has no description.

Public property Shader[AName: string]: TBGLCustomShader read GetShader write SetShader;

This item has no description.

Public property SupportShaders: boolean read GetSupportShaders;

This item has no description.