BsGLTimerQuery.h 681 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. #include "BsGLPrerequisites.h"
  3. #include "BsTimerQuery.h"
  4. namespace BansheeEngine
  5. {
  6. /**
  7. * @copydoc TimerQuery
  8. */
  9. class BS_RSGL_EXPORT GLTimerQuery : public TimerQuery
  10. {
  11. public:
  12. GLTimerQuery();
  13. ~GLTimerQuery();
  14. /**
  15. * @copydoc TimerQuery::begin
  16. */
  17. virtual void begin();
  18. /**
  19. * @copydoc TimerQuery::end
  20. */
  21. virtual void end();
  22. /**
  23. * @copydoc TimerQuery::isReady
  24. */
  25. virtual bool isReady() const;
  26. /**
  27. * @copydoc TimerQuery::getTimeMs
  28. */
  29. virtual float getTimeMs();
  30. private:
  31. friend class QueryManager;
  32. GLuint mQueryStartObj;
  33. GLuint mQueryEndObj;
  34. bool mFinalized;
  35. float mTimeDelta;
  36. void finalize();
  37. };
  38. }