-
Notifications
You must be signed in to change notification settings - Fork 0
/
Renderpass.h
35 lines (27 loc) · 891 Bytes
/
Renderpass.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#include "Basics.h"
#include "Swapchain.h"
#include <vector>
namespace MelonRenderer
{
class Renderpass
{
public:
Renderpass(Swapchain* swapchain);
bool CreateRenderpass();
bool BeginRenderpass(VkCommandBuffer& commandBuffer);
bool EndRenderpass(VkCommandBuffer& commandBuffer);
uint32_t AddAttachment(VkAttachmentDescription& attachment, VkClearValue& clearValue);
uint32_t AddSubpass(VkSubpassDescription& subpass);
void AddSubpassDependency(VkSubpassDependency& subpassDependency);
VkRenderPass* GetVkRenderpass();
VkAttachmentDescription* GetColorAttachmentPointer();
protected:
std::vector<VkAttachmentDescription> m_attachments;
std::vector<VkSubpassDescription> m_subpasses;
std::vector<VkSubpassDependency> m_subpassDependencies;
std::vector<VkClearValue> m_clearValues;
VkRenderPass m_renderpass;
Swapchain* m_swapchain;
};
}