TimestampQueryImpl.h 868 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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/TimestampQuery.h>
  7. #include <AnKi/Gr/Vulkan/VulkanObject.h>
  8. #include <AnKi/Gr/Vulkan/QueryFactory.h>
  9. namespace anki
  10. {
  11. /// @addtogroup vulkan
  12. /// @{
  13. /// Occlusion query.
  14. class TimestampQueryImpl final : public TimestampQuery, public VulkanObject<TimestampQuery, TimestampQueryImpl>
  15. {
  16. public:
  17. MicroQuery m_handle = {};
  18. TimestampQueryImpl(GrManager* manager, CString name)
  19. : TimestampQuery(manager, name)
  20. {
  21. }
  22. ~TimestampQueryImpl();
  23. /// Create the query.
  24. ANKI_USE_RESULT Error init();
  25. /// Get query result.
  26. TimestampQueryResult getResultInternal(Second& timestamp) const;
  27. private:
  28. U64 m_timestampPeriod = 0;
  29. };
  30. /// @}
  31. } // end namespace anki