fMainC.cpp 1.3 KB

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