2
0

OcclusionQueryImpl.h 790 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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/OcclusionQuery.h>
  7. #include <AnKi/Gr/gl/GlObject.h>
  8. namespace anki {
  9. /// @addtogroup opengl
  10. /// @{
  11. /// Occlusion query.
  12. class OcclusionQueryImpl final : public OcclusionQuery, public GlObject
  13. {
  14. public:
  15. OcclusionQueryImpl(GrManager* manager, CString name)
  16. : OcclusionQuery(manager, name)
  17. {
  18. }
  19. ~OcclusionQueryImpl()
  20. {
  21. destroyDeferred(getManager(), glDeleteQueries);
  22. }
  23. /// Create the query.
  24. void init();
  25. /// Begin query.
  26. void begin();
  27. /// End query.
  28. void end();
  29. /// Get query result.
  30. OcclusionQueryResult getResult() const;
  31. };
  32. /// @}
  33. } // end namespace anki