Unit1.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #include <tchar.h>
  4. #pragma hdrstop
  5. #include "Unit1.h"
  6. //---------------------------------------------------------------------------
  7. #pragma package(smart_init)
  8. #pragma link "GLBaseClasses"
  9. #pragma link "GLCadencer"
  10. #pragma link "GLCoordinates"
  11. #pragma link "GLCrossPlatform"
  12. #pragma link "GLObjects"
  13. #pragma link "GLParticleFX"
  14. #pragma link "GLPerlinPFX"
  15. #pragma link "GLScene"
  16. #pragma link "GLWin32Viewer"
  17. #pragma resource "*.dfm"
  18. TForm1 *Form1;
  19. //---------------------------------------------------------------------------
  20. __fastcall TForm1::TForm1(TComponent* Owner)
  21. : TForm(Owner)
  22. {
  23. }
  24. //---------------------------------------------------------------------------
  25. void __fastcall TForm1::GLCadencerProgress(TObject *Sender, const double deltaTime,
  26. const double newTime)
  27. {
  28. SmokePFX->Rotation = newTime;
  29. GLSceneViewer->Invalidate();
  30. }
  31. //---------------------------------------------------------------------------
  32. void __fastcall TForm1::TimerTimer(TObject *Sender)
  33. {
  34. Panel1->Caption =
  35. Format("%.1f FPS",
  36. ARRAYOFCONST((GLSceneViewer->FramesPerSecond(), SmokePFX->ParticleCount()+FlamePFX->ParticleCount(),
  37. ParticleFXRenderer->LastSortTime)));
  38. GLSceneViewer->ResetPerformanceMonitor();
  39. }
  40. //---------------------------------------------------------------------------