unit MainUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, AdDraws, AdClasses, AdTypes, AdPerformanceCounter;
type
TForm1 =
class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
AdDraw: TAdDraw;
CPUCounter: TAdPerformanceCounter;
MyPath:
string;
procedure Idle(Sender: TObject;
var Done: boolean);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
MyPath := ExtractFilePath(ParamStr(0));
AdDraw := TAdDraw.Create(self);
AdDraw.DllName := (MyPath + '
AndorraDX93D.dll');
if AdDraw.Initialize
then
begin
Application.OnIdle := Idle;
CPUCounter := TAdPerformanceCounter.Create();
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
CPUCounter.Free;
AdDraw.Free;
end;
procedure TForm1.Idle(Sender: TObject;
var Done: boolean);
begin
if AdDraw.CanDraw
then
begin
AdDraw.ClearSurface(clBlack);
AdDraw.BeginScene;
AdDraw.Canvas.Pen.Width := 1;
AdDraw.Canvas.Circle(50, 50, 10);
AdDraw.EndScene;
AdDraw.Flip;
end;
Done := false;
end;
end.