Class TAd2DApplication

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TAd2DApplication = class(TObject)

Description

Abstract class which represents an Andorra 2D application.

Hierarchy

Overview

Methods

Public function CreateBitmapTexture: TAd2DBitmapTexture; virtual; abstract;
Public function CreateRenderTargetTexture: TAd2dRenderTargetTexture; virtual; abstract;
Public function CreateMesh: TAd2DMesh; virtual; abstract;
Public function CreatePixelCounter: TAd2dPixelCounter; virtual; abstract;
Public function CreateLight: TAd2dLight; virtual; abstract;
Public procedure SetRenderTarget(ATarget:TAd2dRenderTargetTexture); virtual; abstract;
Public procedure SetProperties(ACount: integer; APProps: PAd2dPropertyValue); virtual; abstract;
Public procedure SetOptions(AOptions: TAd2dOptions); virtual; abstract;
Public procedure SetStencilOptions(AReference, AMask: Word; AFunction: TAd2dStencilFunction); virtual; abstract;
Public procedure SetStencilEvent(AEvent: TAd2dStencilEvent; AOperation: TAd2dStencilOperation); virtual; abstract;
Public function Initialize(AWnd:TAdWindowFramework):boolean; virtual; abstract;
Public procedure Finalize; virtual; abstract;
Public procedure ClearSurface(ARect: TAdRect; ALayers: TAd2dSurfaceLayers; AColor: TAndorraColor; AZValue: double; AStencilValue: integer); virtual; abstract;
Public procedure BeginScene; virtual; abstract;
Public procedure EndScene; virtual; abstract;
Public procedure Flip; virtual; abstract;
Public procedure Setup2DScene(AWidth, AHeight:integer; ANearZ, AFarZ: double); virtual; abstract;
Public procedure Setup3DScene(AWidth, AHeight:integer; APos, ADir, AUp:TAdVector3; ANearZ, AFarZ: double); virtual; abstract;
Public procedure SetupManualScene(AMatView, AMatProj:TAdMatrix); virtual; abstract;
Public procedure GetScene(out AMatView:TAdMatrix; out AMatProj:TAdMatrix); virtual; abstract;
Public function SupportsWindowFramework(AClassId:ShortString):boolean; virtual; abstract;
Public procedure Log(AModule: PChar; ASeverity: TAd2dLogSeverity; AMsg: PChar);

Properties

Public property Width: integer read FWidth;
Public property Height: integer read FHeight;
Public property MaxLights: integer read FMaxLightCount;
Public property Viewport: TAdRect read FViewPort write SetViewPort;
Public property AmbientColor: TAndorraColor read FAmbientColor write SetAmbientColor;
Public property LogCallback: TAd2dLogCallback read FLogCallback write SetLogCallback;
Public property TextureOffset: single read GetTextureOffset;

Description

Methods

Public function CreateBitmapTexture: TAd2DBitmapTexture; virtual; abstract;

Creates and returns a TAd2DBitmapTexture

Public function CreateRenderTargetTexture: TAd2dRenderTargetTexture; virtual; abstract;

Creates and returns a TAd2dRenderTargetTexture

Public function CreateMesh: TAd2DMesh; virtual; abstract;

Creates and returns a TAd2DMesh

Public function CreatePixelCounter: TAd2dPixelCounter; virtual; abstract;

Creates and returns a TAd2DPixelCounter

Public function CreateLight: TAd2dLight; virtual; abstract;

Creates and returns a TAd2dLight

Public procedure SetRenderTarget(ATarget:TAd2dRenderTargetTexture); virtual; abstract;

Sets the surface that the graphic system should render on. If ATarget is nil, the graphic system will rendern on its main surface.

Public procedure SetProperties(ACount: integer; APProps: PAd2dPropertyValue); virtual; abstract;

Loads "ACount" "TAd2dPropertyValue" properties from the memory specified by "APProps".

Public procedure SetOptions(AOptions: TAd2dOptions); virtual; abstract;

Applies the options specified in "AOptions" to the graphic system.

Public procedure SetStencilOptions(AReference, AMask: Word; AFunction: TAd2dStencilFunction); virtual; abstract;

Use this method to setup the stencil buffer.

Public procedure SetStencilEvent(AEvent: TAd2dStencilEvent; AOperation: TAd2dStencilOperation); virtual; abstract;

Using this function you can assign operations to the stencil buffer operations.

Public function Initialize(AWnd:TAdWindowFramework):boolean; virtual; abstract;

Initializes the engine. AWnd is the handle to the window.

Public procedure Finalize; virtual; abstract;

Finalizes the engine.

Public procedure ClearSurface(ARect: TAdRect; ALayers: TAd2dSurfaceLayers; AColor: TAndorraColor; AZValue: double; AStencilValue: integer); virtual; abstract;

Clears the active surface. You can specify which layers and which rectangular region of the surface should be cleared. The coordinats are absolute.

Public procedure BeginScene; virtual; abstract;

Should be called after clearing the surface and before drawing on it.

Public procedure EndScene; virtual; abstract;

Should be called after drawing on the surface and before flipping it.

Public procedure Flip; virtual; abstract;

Flips front and back buffer - presents the scene on the screen.

Public procedure Setup2DScene(AWidth, AHeight:integer; ANearZ, AFarZ: double); virtual; abstract;

Prepares a 2D view and a orthogonal projection matrix. Setting the coordinate systems is usually done by the TAdScene object. Every Andorra surface (e.g. TAdDraw) owns a instance of TAdScene.

Public procedure Setup3DScene(AWidth, AHeight:integer; APos, ADir, AUp:TAdVector3; ANearZ, AFarZ: double); virtual; abstract;

Prepares a 3D view and a perspective projection matrix. Setting the coordinate systems is usually done by the TAdScene object. Every Andorra surface (e.g. TAdDraw) owns a instance of TAdScene.

Public procedure SetupManualScene(AMatView, AMatProj:TAdMatrix); virtual; abstract;

Gives the possibility to setup the coordinate system manualy. Using this method to store own matrices may not work correctly. Only set matrices that were created by the "GetScene" function.

See also
GetScene
Returns the current view and projection matrix.
Public procedure GetScene(out AMatView:TAdMatrix; out AMatProj:TAdMatrix); virtual; abstract;

Returns the current view and projection matrix.

See also
SetupManualScene
Gives the possibility to setup the coordinate system manualy.
Public function SupportsWindowFramework(AClassId:ShortString):boolean; virtual; abstract;

Returns whether the given windowframework is supported.

Public procedure Log(AModule: PChar; ASeverity: TAd2dLogSeverity; AMsg: PChar);

This procedure can be used to add a log message. If the log message callback is not equal to nil, it is called an the parameters are passed.

Properties

Public property Width: integer read FWidth;

Returns the width of the active surface

Public property Height: integer read FHeight;

Returns the height of the active surface

Public property MaxLights: integer read FMaxLightCount;

Returns the number of max lights

Public property Viewport: TAdRect read FViewPort write SetViewPort;

The rectangle where the output is made

Public property AmbientColor: TAndorraColor read FAmbientColor write SetAmbientColor;

The scene ambient color

Public property LogCallback: TAd2dLogCallback read FLogCallback write SetLogCallback;

Callback used to log log messages from the plugin in the host application.

Public property TextureOffset: single read GetTextureOffset;
 

SourceForge.net Logo


Generated by PasDoc 0.11.0 on 2008-12-31 14:31:58