ULRE/inc/hgl/graph/VKFramebuffer.h

42 lines
1.3 KiB
C
Raw Normal View History

#ifndef HGL_GRAPH_VULKAN_FRAMEBUFFER_INCLUDE
2019-04-18 21:42:22 +08:00
#define HGL_GRAPH_VULKAN_FRAMEBUFFER_INCLUDE
#include<hgl/graph/VKRenderPass.h>
2019-04-18 21:42:22 +08:00
VK_NAMESPACE_BEGIN
class Framebuffer
{
VkDevice device;
VkFramebuffer frame_buffer;
RenderPass *render_pass;
VkExtent2D extent;
uint32_t attachment_count;
uint32_t color_count;
bool has_depth;
2019-04-18 21:42:22 +08:00
private:
2020-10-21 12:39:22 +08:00
friend class GPUDevice;
Framebuffer(VkDevice,VkFramebuffer,const VkExtent2D &,RenderPass *,uint32_t color_count,bool depth);
2019-04-18 21:42:22 +08:00
public:
~Framebuffer();
2019-04-18 22:10:24 +08:00
operator VkFramebuffer(){return frame_buffer;}
const VkFramebuffer GetFramebuffer ()const{return frame_buffer;}
RenderPass * GetRenderPass () {return render_pass;}
const VkExtent2D & GetExtent ()const{return extent;}
const uint32_t GetAttachmentCount ()const{return attachment_count;} ///<获取渲染目标成分数量
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
2023-03-18 17:58:57 +08:00
using FBO=Framebuffer;
2019-04-18 21:42:22 +08:00
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_FRAMEBUFFER_INCLUDE