uses
  dresourcemanager
  ,resource_texture
  ;

var
  T: TTexture;
  T2: TTexture;
  Steps: LongInt = 0;

function Step: Boolean;
begin
  Inc(Steps);
  Writeln('Step ', Steps);
  Result := ResourceManager.UpdateStep;
end;

begin
  // check for default constructor
  T.InitDefault;
  // check for overloaded constructor
  T.Done;
  T.Init('test.tga');
  // check for reload method
  T.Load('test2.tga');
  // assign to the test.tga from another reference
  T2.Init('test.tga');
  // Hot reload something
  T.HotReload;
  T.HotReload;
  // Now some loading steps
  while Step do;
  Writeln('(Steps loop done)');
  // Done
  T.Done;
  T2.Done;
  // Now some unloading steps
  while Step do;
  Writeln('(Steps loop done)');
  // Deallocate all resources
  Writeln('Unsafe unloading:');
  ResourceManager.UnloadAllUnsafe;
end.
