unit DEngApp;

interface

uses
  DEng;

type
PEngApp = ^TEngApp;
TEngApp = object
private
public
  constructor Init;
  destructor Done; virtual;
  procedure OnInit; virtual;
  procedure OnDone; virtual;
  procedure OnRender; virtual;
  procedure OnUpdate; virtual;
  procedure OnWindowEvent(const Event: PWindowEvent); virtual;
  procedure StartLoop;
  procedure Run;
end;

implementation

constructor TEngApp.Run;
begin
  Eng.User := @Self;
end;

procedure TEngApp.OnInit;
begin
end;

procedure TEngApp.OnDone;
begin
end;

procedure TEngApp.OnRender;
begin
end;

procedure TEngApp.OnUpdate;
begin
end;

procedure TEngApp.OnWindowEvent(const Event: PWindowEvent);
begin
end;

procedure TEngApp.StartLoop;
begin
end;

procedure TEngApp.Run;
begin
  // Initialize VMT
  Init;
  // Start main loop
  StartLoop;
  // Finalize
  Done;
end;

end.
