delete RenderpassCreater class.
This commit is contained in:
parent
07894d73e4
commit
93c4e39b1a
@ -27,6 +27,7 @@ public:
|
|||||||
const bool IsAlphaBlend()const{return data->alpha_blend;}
|
const bool IsAlphaBlend()const{return data->alpha_blend;}
|
||||||
};//class GraphicsPipeline
|
};//class GraphicsPipeline
|
||||||
|
|
||||||
Pipeline *CreatePipeline(Device *dev,PipelineData *,const Material *material,const RenderTarget *);
|
Pipeline *CreatePipeline(Device *,PipelineData *,const Material *,const RenderTarget *);
|
||||||
VK_NAMESPACE_END
|
VK_NAMESPACE_END
|
||||||
#endif//HGL_GRAPH_VULKAN_PIPELINE_INCLUDE
|
#endif//HGL_GRAPH_VULKAN_PIPELINE_INCLUDE
|
||||||
|
|
@ -46,23 +46,5 @@ public:
|
|||||||
const List<VkFormat> & GetColorFormat()const{return color_formats;}
|
const List<VkFormat> & GetColorFormat()const{return color_formats;}
|
||||||
const VkFormat GetDepthFormat()const{return depth_format;}
|
const VkFormat GetDepthFormat()const{return depth_format;}
|
||||||
};//class RenderPass
|
};//class RenderPass
|
||||||
|
|
||||||
class RenderpassCreater
|
|
||||||
{
|
|
||||||
Device *device;
|
|
||||||
|
|
||||||
List<VkAttachmentDescription> atta_desc_list;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
RenderpassCreater(Device *d)
|
|
||||||
{
|
|
||||||
device=d;
|
|
||||||
}
|
|
||||||
|
|
||||||
~RenderpassCreater()=default;
|
|
||||||
|
|
||||||
int AddSwapchainImage();
|
|
||||||
};//class RenderpassCreater
|
|
||||||
VK_NAMESPACE_END
|
VK_NAMESPACE_END
|
||||||
#endif//HGL_GRAPH_VULKAN_RENDER_PASS_INCLUDE
|
#endif//HGL_GRAPH_VULKAN_RENDER_PASS_INCLUDE
|
||||||
|
@ -5,20 +5,4 @@ RenderPass::~RenderPass()
|
|||||||
{
|
{
|
||||||
vkDestroyRenderPass(device,render_pass,nullptr);
|
vkDestroyRenderPass(device,render_pass,nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
int RenderpassCreater::AddSwapchainImage()
|
|
||||||
{
|
|
||||||
VkAttachmentDescription desc;
|
|
||||||
|
|
||||||
desc.format = device->GetSurfaceFormat();
|
|
||||||
desc.samples = VK_SAMPLE_COUNT_1_BIT;
|
|
||||||
desc.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
|
||||||
desc.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
|
||||||
desc.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
|
||||||
desc.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
|
||||||
desc.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
|
||||||
desc.finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
|
|
||||||
|
|
||||||
return atta_desc_list.Add(desc);
|
|
||||||
}
|
|
||||||
VK_NAMESPACE_END
|
VK_NAMESPACE_END
|
||||||
|
Loading…
x
Reference in New Issue
Block a user