GenericCompute.h 878 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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/Renderer/RendererObject.h>
  7. namespace anki {
  8. /// @addtogroup renderer
  9. /// @{
  10. /// Executes various compute jobs required by the render queue. It's guaranteed to run before light shading and nothing
  11. /// more. It can access the previous frame's depth buffer.
  12. class GenericCompute : public RendererObject
  13. {
  14. public:
  15. GenericCompute(Renderer* r)
  16. : RendererObject(r)
  17. {
  18. }
  19. ~GenericCompute();
  20. ANKI_USE_RESULT Error init(const ConfigSet& cfg)
  21. {
  22. return Error::NONE;
  23. }
  24. /// Populate the rendergraph.
  25. void populateRenderGraph(RenderingContext& ctx);
  26. private:
  27. void run(const RenderingContext& ctx, RenderPassWorkContext& rgraphCtx);
  28. };
  29. /// @}
  30. } // end namespace anki