OcclusionQuery.h 812 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright (C) 2009-present, 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. /// @addtogroup graphics
  9. /// @{
  10. /// Occlusion query.
  11. class OcclusionQuery : public GrObject
  12. {
  13. ANKI_GR_OBJECT
  14. public:
  15. static constexpr GrObjectType kClassType = GrObjectType::kOcclusionQuery;
  16. /// Get the occlusion query result. It won't block.
  17. OcclusionQueryResult getResult() const;
  18. protected:
  19. /// Construct.
  20. OcclusionQuery(CString name)
  21. : GrObject(kClassType, name)
  22. {
  23. }
  24. /// Destroy.
  25. ~OcclusionQuery()
  26. {
  27. }
  28. private:
  29. /// Allocate and initialize a new instance.
  30. [[nodiscard]] static OcclusionQuery* newInstance();
  31. };
  32. /// @}
  33. } // end namespace anki