Unit1.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 "GLBaseClasses.hpp"
  11. #include "GLCadencer.hpp"
  12. #include "GLCoordinates.hpp"
  13. #include "GLCrossPlatform.hpp"
  14. #include "GLGeomObjects.hpp"
  15. #include "GLObjects.hpp"
  16. #include "GLScene.hpp"
  17. #include "GLWin32Viewer.hpp"
  18. #include "OpenGL1x.hpp"
  19. #include "GLContext.hpp"
  20. #include "GLRenderContextInfo.hpp"
  21. //---------------------------------------------------------------------------
  22. class TForm1 : public TForm
  23. {
  24. __published: // IDE-managed Components
  25. TGLSceneViewer *GLSceneViewer1;
  26. TPanel *Panel1;
  27. TLabel *Label1;
  28. TLabel *Label2;
  29. TLabel *Label3;
  30. TLabel *LabelFPS;
  31. TCheckBox *CheckBox1;
  32. TGLScene *GLScene1;
  33. TGLDummyCube *GLDummyCube1;
  34. TGLCube *GLCube1;
  35. TGLCylinder *GLCylinder1;
  36. TGLDummyCube *GLDummyCube2;
  37. TGLCube *GLCube2;
  38. TGLDirectOpenGL *OGLBeginQueries;
  39. TGLDummyCube *dcTestObjects;
  40. TGLTorus *GLTorus1;
  41. TGLCone *GLCone1;
  42. TGLDirectOpenGL *OGLEndQueries;
  43. TGLCamera *GLCamera1;
  44. TGLLightSource *GLLightSource1;
  45. TGLCadencer *GLCadencer1;
  46. TTimer *Timer1;
  47. void __fastcall FormDestroy(TObject *Sender);
  48. void __fastcall GLCadencer1Progress(TObject *Sender, const double deltaTime, const double newTime);
  49. void __fastcall GLSceneViewer1BeforeRender(TObject *Sender);
  50. void __fastcall OGLBeginQueriesRender(TObject *Sender, TGLRenderContextInfo &rci);
  51. void __fastcall OGLEndQueriesRender(TObject *Sender, TGLRenderContextInfo &rci);
  52. void __fastcall Timer1Timer(TObject *Sender);
  53. private: // User declarations
  54. TGLTimerQueryHandle *TimerQuery;
  55. TGLOcclusionQueryHandle *OcclusionQuery;
  56. TGLBooleanOcclusionQueryHandle *bOcclusionQuery;
  57. bool queriesCreated;
  58. bool timerQuerySupported;
  59. int timeTaken; // in nanoseconds
  60. int samplesPassed;
  61. public: // User declarations
  62. __fastcall TForm1(TComponent* Owner);
  63. };
  64. //---------------------------------------------------------------------------
  65. extern PACKAGE TForm1 *Form1;
  66. //---------------------------------------------------------------------------
  67. #endif