- add render pass manager and setup a pipeline for VkRenderState
This commit is contained in:
parent
fbfcc30d00
commit
9ed1c7f40b
15 changed files with 360 additions and 87 deletions
50
src/rendering/vulkan/renderer/vk_renderpass.h
Normal file
50
src/rendering/vulkan/renderer/vk_renderpass.h
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "vulkan/system/vk_objects.h"
|
||||
|
||||
class VKDataBuffer;
|
||||
|
||||
class VkRenderPassSetup
|
||||
{
|
||||
public:
|
||||
VkRenderPassSetup();
|
||||
|
||||
std::unique_ptr<VulkanRenderPass> RenderPass;
|
||||
std::unique_ptr<VulkanPipeline> Pipeline;
|
||||
std::unique_ptr<VulkanFramebuffer> Framebuffer;
|
||||
|
||||
private:
|
||||
void CreatePipeline();
|
||||
void CreateRenderPass();
|
||||
void CreateFramebuffer();
|
||||
};
|
||||
|
||||
class VkRenderPassManager
|
||||
{
|
||||
public:
|
||||
VkRenderPassManager();
|
||||
|
||||
void BeginFrame();
|
||||
|
||||
std::unique_ptr<VulkanDescriptorSetLayout> DynamicSetLayout;
|
||||
std::unique_ptr<VulkanDescriptorSetLayout> TextureSetLayout;
|
||||
std::unique_ptr<VulkanPipelineLayout> PipelineLayout;
|
||||
std::unique_ptr<VulkanDescriptorPool> DescriptorPool;
|
||||
std::unique_ptr<VkRenderPassSetup> RenderPassSetup;
|
||||
|
||||
std::unique_ptr<VulkanImage> SceneColor;
|
||||
std::unique_ptr<VulkanImage> SceneDepthStencil;
|
||||
std::unique_ptr<VulkanImageView> SceneColorView;
|
||||
std::unique_ptr<VulkanImageView> SceneDepthStencilView;
|
||||
std::unique_ptr<VulkanImageView> SceneDepthView;
|
||||
|
||||
std::unique_ptr<VulkanDescriptorSet> DynamicSet;
|
||||
|
||||
private:
|
||||
void CreateDynamicSetLayout();
|
||||
void CreateTextureSetLayout();
|
||||
void CreatePipelineLayout();
|
||||
void CreateDescriptorPool();
|
||||
void CreateDynamicSet();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue