2
0

TimestampQuery.h 873 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Gr/GrObject.h>
  7. namespace anki
  8. {
  9. /// @addtogroup graphics
  10. /// @{
  11. /// Timestamp query.
  12. class TimestampQuery : public GrObject
  13. {
  14. ANKI_GR_OBJECT
  15. public:
  16. static const GrObjectType CLASS_TYPE = GrObjectType::TIMESTAMP_QUERY;
  17. /// Get the result if it's available. It won't block.
  18. TimestampQueryResult getResult(Second& timestamp) const;
  19. protected:
  20. /// Construct.
  21. TimestampQuery(GrManager* manager, CString name)
  22. : GrObject(manager, CLASS_TYPE, name)
  23. {
  24. }
  25. /// Destroy.
  26. ~TimestampQuery()
  27. {
  28. }
  29. private:
  30. /// Allocate and initialize a new instance.
  31. static ANKI_USE_RESULT TimestampQuery* newInstance(GrManager* manager);
  32. };
  33. /// @}
  34. } // end namespace anki