TilesD.dpr 954 B

1234567891011121314151617181920212223242526
  1. (*
  2. TGLTilePlane demo.
  3. Illustrates the use of TGLTilePlane to render an area made of tiled
  4. textures placed in a grid. The components links to a materiallibrary
  5. (containing tile materials, referred by index) and renders the area
  6. with quads sorted by material.
  7. The size of the area for TGLTilePlane is infinite (i.e. limited by
  8. available memory) and adjusts itself dynamically.
  9. The tile overlap can be adjusted by the texture coordinates scaling
  10. of the material, for instance, the "marbletiles" texture covers 4 tiles
  11. and the "walkway" texture covers 2 tiles in this demo.
  12. Note that if you don't have a "pro" OpenGL card, the grid with its smoothed
  13. lines may cost you a lot of FPS, so you may want to turn it off for
  14. performance assessments
  15. *)
  16. program TilesD;
  17. uses
  18. Forms,
  19. fTilesD in 'fTilesD.pas' {FormTiles};
  20. {$R *.res}
  21. begin
  22. Application.Initialize;
  23. Application.CreateForm(TFormTiles, FormTiles);
  24. Application.Run;
  25. end.