ULRE/inc/hgl/graph/vulkan/VKRenderPass.h

41 lines
1020 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef HGL_GRAPH_VULKAN_RENDER_PASS_INCLUDE
#define HGL_GRAPH_VULKAN_RENDER_PASS_INCLUDE
#include<hgl/graph/vulkan/VK.h>
VK_NAMESPACE_BEGIN
/**
* RenderPass功能封装<br>
* RenderPass在创建时需要指定输入的color imageview与depth imageview象素格式
* 在随后创建Framebuffer时需要同时指定RenderPass与ColorImageView,DepthImageView象素格式要一致。
*/
class RenderPass
{
VkDevice device;
VkRenderPass render_pass;
VkFormat color_format,depth_format;
private:
friend class Device;
RenderPass(VkDevice d,VkRenderPass rp,VkFormat cf,VkFormat df)
{
device=d;
render_pass=rp;
color_format=cf;
depth_format=df;
}
public:
virtual ~RenderPass();
operator VkRenderPass(){return render_pass;}
const VkFormat GetColorFormat()const{return color_format;}
const VkFormat GetDepthFormat()const{return depth_format;}
};//class RenderPass
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_RENDER_PASS_INCLUDE