OcclusionQuery.h 854 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. /// Occlusion query.
  12. class OcclusionQuery : public GrObject
  13. {
  14. ANKI_GR_OBJECT
  15. public:
  16. static const GrObjectType CLASS_TYPE = GrObjectType::OCCLUSION_QUERY;
  17. /// Get the occlusion query result. It won't block.
  18. OcclusionQueryResult getResult() const;
  19. protected:
  20. /// Construct.
  21. OcclusionQuery(GrManager* manager, CString name)
  22. : GrObject(manager, CLASS_TYPE, name)
  23. {
  24. }
  25. /// Destroy.
  26. ~OcclusionQuery()
  27. {
  28. }
  29. private:
  30. /// Allocate and initialize a new instance.
  31. static ANKI_USE_RESULT OcclusionQuery* newInstance(GrManager* manager);
  32. };
  33. /// @}
  34. } // end namespace anki