Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
VulkanRenderPass.hpp
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include <Common/Graphics/RenderPass.hpp>
7#include <vulkan/vulkan.h>
8
10 class RenderPass : public Grindstone::GraphicsAPI::RenderPass {
11 public:
12 RenderPass(VkRenderPass renderPass, const char* renderPassName);
13 RenderPass(const CreateInfo& createInfo);
14 virtual ~RenderPass() override;
15 public:
16 void Update(VkRenderPass renderPass);
17 virtual VkRenderPass GetRenderPassHandle() const;
18 virtual const char* GetDebugName() const override;
19 virtual const float* GetDebugColor() const override;
20 size_t GetColorAttachmentCount() const;
21 VkFormat GetVkColorFormat(size_t i) const;
22 VkFormat GetVkDepthFormat() const;
23 VkFormat GetVkStencilFormat() const;
24
25 bool shouldClearDepthOnLoad = true;
26 private:
27 void Create();
28 void Cleanup();
29
30 std::string debugName;
31 float debugColor[4] = {};
32 std::vector<RenderPass::AttachmentInfo> colorAttachments;
33 Format depthFormat = Format::Invalid;
34 bool ownsRenderPass = true;
35 VkRenderPass renderPass = nullptr;
36 };
37}
Definition RenderPass.hpp:10
Definition ImguiRendererVulkan.hpp:11