Toast Engine
Loading...
Searching...
No Matches
post_process_pass_base.hpp
Go to the documentation of this file.
1
4
5#pragma once
6
7#include "vulkan_common.hpp"
8
9#include <atomic>
10#include <string_view>
11
12namespace renderer {
13
15public:
16 virtual ~IPostProcessPass() = default;
17
19 virtual auto record(vk::CommandBuffer cmd, uint32_t frame_index, vk::ImageView source_view) -> vk::ImageView = 0;
20
21 virtual void onResize(vk::Extent2D extent) { }
22
23 [[nodiscard]]
24 virtual auto name() const -> std::string_view {
25 return "PostProcess";
26 }
27
28 void setEnabled(bool enabled) noexcept { m_enabled.store(enabled, std::memory_order_relaxed); }
29
30 [[nodiscard]]
31 auto isEnabled() const noexcept -> bool {
32 return m_enabled.load(std::memory_order_relaxed);
33 }
34
35private:
36 std::atomic_bool m_enabled {true};
37};
38
39}
Definition post_process_pass_base.hpp:14
virtual auto record(vk::CommandBuffer cmd, uint32_t frame_index, vk::ImageView source_view) -> vk::ImageView=0