diff options
| author | hachem <im@hachem.wtf> | 2026-08-23 21:44:51 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-23 21:44:51 +0200 |
| commit | 2959cfaf69d770955ab655379134e037590a6933 (patch) | |
| tree | 3d9b6dff572b0e83b0bb123687474e5a6739d631 /src/rendering/render_path.h | |
| parent | c80392e402fc18094b563b0061dfb69274ae4f0b (diff) | |
feat: render path and views
Diffstat (limited to 'src/rendering/render_path.h')
| -rw-r--r-- | src/rendering/render_path.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/rendering/render_path.h b/src/rendering/render_path.h new file mode 100644 index 0000000..abe7db2 --- /dev/null +++ b/src/rendering/render_path.h @@ -0,0 +1,33 @@ +#pragma once + +#include "rhi.h" +#include "view.h" +#include "scene_renderer.h" +#include "black_hole_renderer.h" +#include "core/memory.h" + +#include <string> + +namespace Donut +{ + class Scene; + + class RenderPath + { + public: + auto init(RHI::Device& device, const std::string& hdri_path) -> bool; + auto shutdown() -> void; + + auto sync_hdri(const std::string& hdri_path) -> void; + + auto render(RHI::CommandList& cmd, Scene& scene, View view, + int fb_width, int fb_height, bool moving, float time) -> void; + + private: + RHI::Device* m_device = nullptr; + Scope<SceneRenderer> m_scene_renderer; + Scope<BlackHoleRenderer> m_black_hole_renderer; + Ref<RHI::Texture> m_cubemap; + std::string m_hdri_path; + }; +} |
