PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
Framebuffers.hpp
1#pragma once
2
3#include "PixelBullet/Graphics/Images/Image2D.hpp"
4#include "PixelBullet/Graphics/Renderpass/Swapchain.hpp"
5
6#include <glm/vec2.hpp>
7
8namespace PixelBullet
9{
10 class LogicalDevice;
11 class ImageDepth;
12 class Renderpass;
13 class RenderStage;
14
16 {
17 public:
18 Framebuffers(const LogicalDevice& logicalDevice, const Swapchain& swapchain, const RenderStage& renderStage,
19 const Renderpass& renderPass, const ImageDepth& depthStencil, const glm::uvec2& extent,
20 VkSampleCountFlagBits samples = VK_SAMPLE_COUNT_1_BIT);
22
23 Framebuffers(const Framebuffers&) = delete;
24 Framebuffers& operator=(const Framebuffers&) = delete;
25
26 Framebuffers(Framebuffers&&) = default;
27 Framebuffers& operator=(Framebuffers&&) = default;
28
29 Image2D* GetAttachment(uint32_t index) const
30 {
31 return m_ImageAttachments[index].get();
32 }
33
34 const std::vector<std::unique_ptr<Image2D>>& GetImageAttachments() const
35 {
36 return m_ImageAttachments;
37 }
38 const std::vector<VkFramebuffer>& GetFramebuffers() const
39 {
40 return m_Framebuffers;
41 }
42
43 private:
44 const LogicalDevice& m_LogicalDevice;
45 std::vector<std::unique_ptr<Image2D>> m_ImageAttachments;
46 std::vector<VkFramebuffer> m_Framebuffers;
47 };
48} // namespace PixelBullet
Definition Framebuffers.hpp:16
Resource that represents a 2D image.
Definition Image2D.hpp:18
Resource that represents a depth‑stencil image.
Definition ImageDepth.hpp:13
Definition LogicalDevice.hpp:13
Definition RenderStage.hpp:205
Definition Renderpass.hpp:14
Definition Swapchain.hpp:14