SimpleGL  1.1.0
A framework for platform independent rendering
framebuffer.hpp
Go to the documentation of this file.
1 
8 #ifndef FRAMEBUFFER_HPP
9 #define FRAMEBUFFER_HPP
10 
11 #include <SimpleGL_vk/SimpleGL_vk_Export.h>
12 
13 #include <vulkan/vulkan.h>
14 
15 #include "render_pass.hpp"
16 
17 namespace sgl {
18 
25 
27  VkImage image;
28 
30  VkDeviceMemory memory;
31 
33  VkImageView imageView;
34 
36  VkFormat format;
37  };
38 
44  class SIMPLEGL_VK_EXPORT FramebufferVK {
45 
46  private:
48  VkFramebuffer handle;
49 
51  DepthStencilBuffer depthStencil;
52 
54  void createDepthStencilBuffer();
55 
56  public:
63  FramebufferVK(RenderPass* renderPass, VkImageView imageView);
64 
66  ~FramebufferVK(void);
67 
73  VkFramebuffer getHandle();
74 
80  DepthStencilBuffer getDepthStencilBuffer();
81  };
82 }
83 
84 #endif /* FRAMEBUFFER_HPP */
This struct stores the data of a depth stencil buffer.
Definition: framebuffer.hpp:24
VkImageView imageView
Stores the depth stencil image view.
Definition: framebuffer.hpp:33
Generic namespace for the SimpleGL framework.
Definition: application.hpp:18
VkFormat format
Stores the depth stencil format.
Definition: framebuffer.hpp:36
This class wraps a Vulkan framebuffer.
Definition: framebuffer.hpp:44
VkDeviceMemory memory
Stores the depth stencil device memory.
Definition: framebuffer.hpp:30
This class wraps a Vulkan render pass.
Definition: render_pass.hpp:22
VkImage image
Stores the depth stencil image.
Definition: framebuffer.hpp:27