TimestampQueryImpl.h 868 B

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