30 void Update(
const RenderDevice& render_device,
const std::map<std::string, std::unique_ptr<RenderTarget2D>>& render_targets);
31 void Rebuild(
const RenderDevice& render_device,
const std::map<std::string, std::unique_ptr<RenderTarget2D>>& render_targets,
32 const Swapchain& swapchain);
34 const Descriptor* GetDescriptor(
const std::string& name)
const;
35 const Descriptor* GetDescriptor(uint32_t binding)
const;
36 const VkFramebuffer& GetActiveFramebuffer(uint32_t active_swapchain_image)
const;
37 const Renderpass* GetRenderpass()
const
39 return renderpass_.get();
41 const ImageDepth* GetDepthStencil()
const
43 return depth_stencil_.get();
46 const std::vector<VkClearValue>& GetClearValues()
const
50 uint32_t GetAttachmentCount(uint32_t subpass)
const
52 return subpass_attachment_count_[subpass];
54 bool HasSwapchain()
const
56 return swapchain_attachment_.has_value();
58 bool IsOutOfDate()
const
62 const glm::uvec2& GetExtent()
const
66 const glm::ivec2& GetOffset()
const
71 const std::map<std::string, const Descriptor*>& GetDescriptors()
const
77 return *specification_;
81 void RebuildDescriptors(
const std::map<std::string, std::unique_ptr<RenderTarget2D>>& render_targets);
86 std::unique_ptr<Renderpass> renderpass_;
87 std::unique_ptr<ImageDepth> depth_stencil_;
88 std::unique_ptr<Framebuffers> framebuffers_;
90 std::map<std::string, const Descriptor*> descriptors_;
91 std::map<uint32_t, const Descriptor*> descriptors_by_binding_;
93 std::vector<VkClearValue> clear_values_;
94 std::vector<uint32_t> subpass_attachment_count_;
95 std::optional<Attachment> depth_attachment_;
96 std::optional<Attachment> swapchain_attachment_;
97 std::vector<bool> subpass_multisampled_;
99 glm::uvec2 extent_{ 0, 0 };
100 glm::ivec2 offset_{ 0, 0 };
101 float aspect_ratio_ = 1.0f;
102 bool out_of_date_ =
false;