uses
  DEng;

type
TApp = object
  procedure Render;
  procedure OnEngStarted(Eng: TEngine);
end;

procedure Render;
begin
  Eng.Graph.ClearScreen(Vec4f(Random, Random, Random, 1.0));
end;

procedure OnEngStarted(Eng: TEngine);
begin
  Eng.SetRender(Render);
  Eng.Control.Regist(KEY_ESC, STATE_DOWN, @Eng.StopLoop);
end;

var
  App: TApp;

begin
  EngFastStart(@App.OnEngStarted, 800, 600);
end.
