unit datlas;

//
//  Dynamic atlas generator.
//

{$MODE FPC}
{$MODESWITCH DEFAULTPARAMETERS}
{$MODESWITCH OUT}
{$MODESWITCH RESULT}

interface

type
PAtlasRect = ^TAtlasRect;
TAtlasRect = record
  X, Y: Int16;
end;

TAtlas = object
public
  procedure Init;
  procedure Done;
  procedure SetTextureSize(W, H: PtrInt);
  function Pack(W, H: PtrInt; out R: PAtlasRect): Boolean;
  procedure Delete(R: PAtlasRect);
  procedure Repack;
end;

TAtlasManager = object
public
  procedure SetMaximumTextureSize(W, H: PtrInt);
  function Pack(W, H: PtrInt; out R: PAtlasRect): Boolean;
  procedure Delete(R: PAtlasRect);
end;

implementation

procedure TAtlas.Init;
begin
end;

procedure TAtlas.Done;
begin
end;

procedure TAtlas.SetTextureSize(W, H: PtrInt);
begin
end;

function TAtlas.Pack(W, H: PtrInt; out R: PAtlasRect): Boolean;
begin
  Exit(True);
end;

procedure TAtlas.Delete(R: PAtlasRect);
begin
end;

procedure TAtlas.Repack;
begin
end;

procedure TAtlasManager.SetMaximumTextureSize(W, H: PtrInt);
begin
end;

function TAtlasManager.Pack(W, H: PtrInt; out R: PAtlasRect): Boolean;
begin
  Exit(True);
end;

procedure TAtlasManager.Delete(R: PAtlasRect);
begin
end;

end.
