#pragma once #include #include #include "Gpu.hpp" struct Framebuffer { VkFramebuffer framebuffer; Framebuffer(VkFramebuffer fb); Framebuffer(const Gpu* gpu, const VkRenderPass renderpass, const VkExtent2D extent, const std::vector& attachments); }; class FramebufferBuilder { private: VkRenderPass m_renderpass; VkExtent2D m_extent; std::vector m_attachments; public: FramebufferBuilder(VkRenderPass renderpass, VkExtent2D extent); FramebufferBuilder(VkRenderPass renderpass, VkExtent2D extent, uint32_t numAttachments); FramebufferBuilder(VkRenderPass renderpass, VkExtent2D extent, std::vector attachments); FramebufferBuilder& set_attachment(uint32_t index, VkImageView view); Framebuffer build(const Gpu* gpu); };