This commit is contained in:
Martin Slachta
2026-07-18 14:31:15 +02:00
commit a04f0dc262
3343 changed files with 1140208 additions and 0 deletions
@@ -0,0 +1,33 @@
#pragma once
#include <volk.h>
#include <vector>
#include "Gpu.hpp"
struct Framebuffer {
VkFramebuffer framebuffer;
Framebuffer(VkFramebuffer fb);
Framebuffer(const Gpu* gpu, const VkRenderPass renderpass, const VkExtent2D extent,
const std::vector<VkImageView>& attachments);
};
class FramebufferBuilder {
private:
VkRenderPass m_renderpass;
VkExtent2D m_extent;
std::vector<ImageView> m_attachments;
public:
FramebufferBuilder(VkRenderPass renderpass, VkExtent2D extent);
FramebufferBuilder(VkRenderPass renderpass, VkExtent2D extent, uint32_t numAttachments);
FramebufferBuilder(VkRenderPass renderpass, VkExtent2D extent, std::vector<ImageView> attachments);
FramebufferBuilder& set_attachment(uint32_t index, VkImageView view);
Framebuffer build(const Gpu* gpu);
};