2019-06-25 22:26:09 +08:00
|
|
|
|
#ifndef HGL_GRAPH_VULKAN_FRAMEBUFFER_INCLUDE
|
2019-04-18 21:42:22 +08:00
|
|
|
|
#define HGL_GRAPH_VULKAN_FRAMEBUFFER_INCLUDE
|
|
|
|
|
|
2020-10-21 11:43:18 +08:00
|
|
|
|
#include<hgl/graph/VK.h>
|
2019-04-18 21:42:22 +08:00
|
|
|
|
VK_NAMESPACE_BEGIN
|
|
|
|
|
class Framebuffer
|
|
|
|
|
{
|
|
|
|
|
VkDevice device;
|
|
|
|
|
VkFramebuffer frame_buffer;
|
2020-10-17 14:18:09 +08:00
|
|
|
|
VkRenderPass render_pass;
|
2019-07-16 19:59:53 +08:00
|
|
|
|
|
|
|
|
|
VkExtent2D extent;
|
2020-10-17 14:18:09 +08:00
|
|
|
|
uint32_t attachment_count;
|
2019-07-16 19:59:53 +08:00
|
|
|
|
uint32_t color_count;
|
|
|
|
|
bool has_depth;
|
2019-04-18 21:42:22 +08:00
|
|
|
|
|
2020-10-15 22:13:15 +08:00
|
|
|
|
private:
|
2019-07-16 19:59:53 +08:00
|
|
|
|
|
2020-10-21 12:39:22 +08:00
|
|
|
|
friend class GPUDevice;
|
2019-07-16 19:59:53 +08:00
|
|
|
|
|
2020-10-17 14:18:09 +08:00
|
|
|
|
Framebuffer(VkDevice,VkFramebuffer,const VkExtent2D &,VkRenderPass,uint32_t color_count,bool depth);
|
2019-04-18 21:42:22 +08:00
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
~Framebuffer();
|
2019-04-18 22:10:24 +08:00
|
|
|
|
|
2019-07-16 20:22:29 +08:00
|
|
|
|
const VkFramebuffer GetFramebuffer ()const{return frame_buffer;}
|
2020-10-17 14:18:09 +08:00
|
|
|
|
const VkRenderPass GetRenderPass ()const{return render_pass;}
|
2019-07-16 19:59:53 +08:00
|
|
|
|
|
|
|
|
|
const VkExtent2D & GetExtent ()const{return extent;}
|
|
|
|
|
|
2020-10-17 14:18:09 +08:00
|
|
|
|
const uint32_t GetAttachmentCount ()const{return attachment_count;} ///<获取渲染目标成分数量
|
2019-07-16 19:59:53 +08:00
|
|
|
|
const uint32_t GetColorCount ()const{return color_count;} ///<取得颜色成分数量
|
|
|
|
|
const bool HasDepth ()const{return has_depth;} ///<是否包含深度成分
|
2019-04-18 21:42:22 +08:00
|
|
|
|
};//class Framebuffer
|
|
|
|
|
VK_NAMESPACE_END
|
|
|
|
|
#endif//HGL_GRAPH_VULKAN_FRAMEBUFFER_INCLUDE
|