Unit1.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //---------------------------------------------------------------------------
  2. #ifndef Unit1H
  3. #define Unit1H
  4. //---------------------------------------------------------------------------
  5. #include <System.Classes.hpp>
  6. #include <Vcl.Controls.hpp>
  7. #include <Vcl.StdCtrls.hpp>
  8. #include <Vcl.Forms.hpp>
  9. #include <Vcl.ExtCtrls.hpp>
  10. #include "GLS.BaseClasses.hpp"
  11. #include "GLS.Cadencer.hpp"
  12. #include "GLS.Coordinates.hpp"
  13. #include "GLS.GeomObjects.hpp"
  14. #include "GLS.Objects.hpp"
  15. #include "GLS.Scene.hpp"
  16. #include "GLS.SceneViewer.hpp"
  17. #include "GLS.Context.hpp"
  18. #include "GLS.RenderContextInfo.hpp"
  19. //---------------------------------------------------------------------------
  20. class TForm1 : public TForm
  21. {
  22. __published: // IDE-managed Components
  23. TGLSceneViewer *GLSceneViewer1;
  24. TPanel *Panel1;
  25. TLabel *Label1;
  26. TLabel *Label2;
  27. TLabel *Label3;
  28. TLabel *LabelFPS;
  29. TCheckBox *CheckBox1;
  30. TGLScene *GLScene1;
  31. TGLDummyCube *GLDummyCube1;
  32. TGLCube *GLCube1;
  33. TGLCylinder *GLCylinder1;
  34. TGLDummyCube *GLDummyCube2;
  35. TGLCube *GLCube2;
  36. TGLDirectOpenGL *OGLBeginQueries;
  37. TGLDummyCube *dcTestObjects;
  38. TGLTorus *GLTorus1;
  39. TGLCone *GLCone1;
  40. TGLDirectOpenGL *OGLEndQueries;
  41. TGLCamera *GLCamera1;
  42. TGLLightSource *GLLightSource1;
  43. TGLCadencer *GLCadencer1;
  44. TTimer *Timer1;
  45. void __fastcall FormDestroy(TObject *Sender);
  46. void __fastcall GLCadencer1Progress(TObject *Sender, const double deltaTime, const double newTime);
  47. void __fastcall GLSceneViewer1BeforeRender(TObject *Sender);
  48. void __fastcall OGLBeginQueriesRender(TObject *Sender, TGLRenderContextInfo &rci);
  49. void __fastcall OGLEndQueriesRender(TObject *Sender, TGLRenderContextInfo &rci);
  50. void __fastcall Timer1Timer(TObject *Sender);
  51. private: // User declarations
  52. TGLTimerQueryHandle *TimerQuery;
  53. TGLOcclusionQueryHandle *OcclusionQuery;
  54. TGLBooleanOcclusionQueryHandle *bOcclusionQuery;
  55. bool queriesCreated;
  56. bool timerQuerySupported;
  57. int timeTaken; // in nanoseconds
  58. int samplesPassed;
  59. public: // User declarations
  60. __fastcall TForm1(TComponent* Owner);
  61. };
  62. //---------------------------------------------------------------------------
  63. extern PACKAGE TForm1 *Form1;
  64. //---------------------------------------------------------------------------
  65. #endif