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

35 lines
728 B
C
Raw Normal View History

2019-04-18 21:42:22 +08:00
#ifndef HGL_GRAPH_VULKAN_FRAMEBUFFER_INCLUDE
#define HGL_GRAPH_VULKAN_FRAMEBUFFER_INCLUDE
#include"VK.h"
VK_NAMESPACE_BEGIN
2019-04-18 22:10:24 +08:00
class Device;
class RenderPass;
class ImageView;
2019-04-18 22:10:24 +08:00
2019-04-18 21:42:22 +08:00
class Framebuffer
{
VkDevice device;
VkFramebuffer frame_buffer;
private:
friend Framebuffer *CreateFramebuffer(Device *,RenderPass *,ImageView *color,ImageView *depth);
2019-04-18 21:42:22 +08:00
Framebuffer(VkDevice dev,VkFramebuffer fb)
{
device=dev;
frame_buffer=fb;
}
public:
~Framebuffer();
2019-04-18 22:10:24 +08:00
operator VkFramebuffer(){return frame_buffer;}
2019-04-18 21:42:22 +08:00
};//class Framebuffer
Framebuffer *CreateFramebuffer(Device *,RenderPass *,ImageView *color,ImageView *depth=nullptr);
2019-04-18 21:42:22 +08:00
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_FRAMEBUFFER_INCLUDE