initial
This commit is contained in:
@@ -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);
|
||||
};
|
||||
Reference in New Issue
Block a user