OcclusionQueryD.dpr 830 B

12345678910111213141516171819202122232425262728
  1. {: Demo for Occlusion Querying (also includes timer query).
  2. Occlusion querying is useful for counting how many pixels (or samples) of an
  3. object are visible on screen.
  4. This demo renders a few objects normally, then queries how many pixels are
  5. visible of the objects rendered between the start of the query and the
  6. end of the query (the objects contained inside dcTestObjects dummycube).
  7. Any objects rendered after the query has finished won't be included in the
  8. results.
  9. A timer query is also included to see how long it takes to render the same
  10. objects.
  11. }
  12. program OcclusionQueryD;
  13. uses
  14. Forms,
  15. fOcclusionQueryD in 'fOcclusionQueryD.pas' {FormOcclusionQuery};
  16. {$R *.res}
  17. begin
  18. Application.Initialize;
  19. Application.CreateForm(TFormOcclusionQuery, FormOcclusionQuery);
  20. Application.Run;
  21. end.