fSmokingC.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #include <tchar.h>
  4. #pragma hdrstop
  5. #include "fSmokingC.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. TFormSmoking *FormSmoking;
  18. //---------------------------------------------------------------------------
  19. __fastcall TFormSmoking::TFormSmoking(TComponent* Owner)
  20. : TForm(Owner)
  21. {
  22. }
  23. //---------------------------------------------------------------------------
  24. void __fastcall TFormSmoking::GLCadencerProgress(TObject *Sender, const double deltaTime,
  25. const double newTime)
  26. {
  27. SmokePFX->Rotation = newTime;
  28. GLSceneViewer->Invalidate();
  29. }
  30. //---------------------------------------------------------------------------
  31. void __fastcall TFormSmoking::TimerTimer(TObject *Sender)
  32. {
  33. /*
  34. Panel1->Caption = Format("%.1f FPS",
  35. ARRAYOFCONST((GLSceneViewer->FramesPerSecond(), SmokePFX->ParticleCount()+FlamePFX->ParticleCount(),
  36. ParticleFXRenderer->LastSortTime)));
  37. */
  38. Panel1->Caption = GLSceneViewer->FramesPerSecond();
  39. GLSceneViewer->ResetPerformanceMonitor();
  40. }
  41. //---------------------------------------------------------------------------