85 SubpassType(uint32_t binding, std::vector<uint32_t> attachmentBindings)
87 , m_AttachmentBindings(std::move(attachmentBindings))
91 uint32_t GetBinding()
const
95 const std::vector<uint32_t>& GetAttachmentBindings()
const
97 return m_AttachmentBindings;
102 std::vector<uint32_t> m_AttachmentBindings;
209 explicit RenderStage(std::vector<Attachment> images = {}, std::vector<SubpassType> subpasses = {},
213 void Rebuild(
const Swapchain& swapchain);
215 std::optional<Attachment> GetAttachment(
const std::string& name)
const;
216 std::optional<Attachment> GetAttachment(uint32_t binding)
const;
218 const Descriptor* GetDescriptor(
const std::string& name)
const;
219 const VkFramebuffer& GetActiveFramebuffer(uint32_t activeSwapchainImage)
const;
221 const std::vector<Attachment>& GetAttachments()
const
223 return m_Attachments;
225 const std::vector<SubpassType>& GetSubpasses()
const
234 void SetViewport(
const Viewport& viewport)
236 this->m_Viewport = viewport;
259 return m_Renderpass.get();
261 const ImageDepth* GetDepthStencil()
const
263 return m_DepthStencil.get();
265 const Framebuffers* GetFramebuffers()
const
267 return m_Framebuffers.get();
269 const std::vector<VkClearValue>& GetClearValues()
const
271 return m_ClearValues;
273 uint32_t GetAttachmentCount(uint32_t subpass)
const
275 return m_SubpassAttachmentCount[subpass];
277 bool HasDepth()
const
279 return m_DepthAttachment.has_value();
281 bool HasSwapchain()
const
283 return m_SwapchainAttachment.has_value();
285 bool IsMultisampled(uint32_t subpass)
const
287 return m_SubpassMultisampled[subpass];
291 std::vector<Attachment> m_Attachments;
292 std::vector<SubpassType> m_Subpasses;
296 std::unique_ptr<Renderpass> m_Renderpass;
297 std::unique_ptr<ImageDepth> m_DepthStencil;
298 std::unique_ptr<Framebuffers> m_Framebuffers;
300 std::map<std::string, const Descriptor*> m_Descriptors;
302 std::vector<VkClearValue> m_ClearValues;
303 std::vector<uint32_t> m_SubpassAttachmentCount;
304 std::optional<Attachment> m_DepthAttachment;
305 std::optional<Attachment> m_SwapchainAttachment;
306 std::vector<bool> m_SubpassMultisampled;
308 RenderArea m_RenderArea;
309 bool m_OutOfDate =
false;
Attachment(uint32_t binding, std::string name, Type type, bool multisampled=false, VkFormat format=VK_FORMAT_R8G8B8A8_UNORM, const Color &clearColour=Color::Black)
Definition RenderStage.hpp:37
Module that manages the Vulkan m_Instance, Surface, Window and the renderpass structure.
Definition Graphics.hpp:32