]> git.tdb.fi Git - libs/gl.git/blob - source/backends/vulkan/framebuffer_backend.h
3fa75421cb03b2f61a1ca61e54561999c5441000
[libs/gl.git] / source / backends / vulkan / framebuffer_backend.h
1 #ifndef MSP_GL_FRAMEBUFFER_BACKEND_H_
2 #define MSP_GL_FRAMEBUFFER_BACKEND_H_
3
4 #include <string>
5 #include "frameformat.h"
6 #include "handles.h"
7
8 namespace Msp {
9 namespace GL {
10
11 class Device;
12 class Texture;
13
14 class VulkanFramebuffer: public NonCopyable
15 {
16         friend class RenderPass;
17         friend class VulkanCommands;
18         friend class VulkanPipelineState;
19
20 protected:
21         Device &device;
22         mutable VkFramebuffer handle = 0;
23         mutable std::vector<VkImageView> view_handles;
24         std::string debug_name;
25
26         VulkanFramebuffer(bool);
27         VulkanFramebuffer(VulkanFramebuffer &&);
28         ~VulkanFramebuffer();
29
30         bool is_format_supported(const FrameFormat &);
31         static void require_layered() { }
32
33         void update(unsigned) const;
34         void require_complete() const { }
35
36         void prepare_image_layouts(bool = false) const;
37
38         void set_debug_name(const std::string &);
39         void set_vulkan_object_name() const;
40 };
41
42 using FramebufferBackend = VulkanFramebuffer;
43
44 } // namespace GL
45 } // namespace Msp
46
47 #endif