|
Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
|
Manages the lifecycle, image views, render pass, and framebuffers of a Vulkan Swapchain. More...
#include <SwapchainManager.hpp>
Public Member Functions | |
| void | create (VkDevice device, VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkExtent2D windowSize) |
| Queries hardware capabilities, builds swapchain, views, render pass, and framebuffers. | |
| void | cleanup (VkDevice device) |
| Frees all allocated swapchain resources. | |
Public Attributes | |
| VkSwapchainKHR | swapchain = VK_NULL_HANDLE |
| Vulkan swapchain handle. | |
| std::vector< VkImage > | images |
| Retrieved images from the swapchain. | |
| std::vector< VkImageView > | imageViews |
| Formatted image views mapping to swapchain images. | |
| VkFormat | imageFormat |
| format type of swapchain images. | |
| VkExtent2D | extent |
| Size dimensions of swapchain images. | |
| VkRenderPass | renderPass = VK_NULL_HANDLE |
| Main render pass associated with swapchain frames. | |
| std::vector< VkFramebuffer > | framebuffers |
| Framebuffers wrapping swapchain image views. | |
Manages the lifecycle, image views, render pass, and framebuffers of a Vulkan Swapchain.
| void SwapchainManager::cleanup | ( | VkDevice | device | ) |
Frees all allocated swapchain resources.
Destroys and cleans up swapchain, image views, render pass and framebuffers.
| device | Logical device context. |
| void SwapchainManager::create | ( | VkDevice | device, |
| VkPhysicalDevice | physicalDevice, | ||
| VkSurfaceKHR | surface, | ||
| VkExtent2D | windowSize ) |
Queries hardware capabilities, builds swapchain, views, render pass, and framebuffers.
Configures swapchain properties, creates KHR swapchain, extracts images, wraps image views, establishes render pass and framebuffers.
| device | Vulkan logical device context. |
| physicalDevice | Vulkan physical device. |
| surface | Window rendering surface. |
| windowSize | Extent target dimensions. |
| device | Vulkan logical device context. |
| physicalDevice | Physical device. |
| surface | Window rendering surface. |
| windowSize | Extent target dimensions. |
| VkExtent2D SwapchainManager::extent |
Size dimensions of swapchain images.
| std::vector<VkFramebuffer> SwapchainManager::framebuffers |
Framebuffers wrapping swapchain image views.
| VkFormat SwapchainManager::imageFormat |
format type of swapchain images.
| std::vector<VkImage> SwapchainManager::images |
Retrieved images from the swapchain.
| std::vector<VkImageView> SwapchainManager::imageViews |
Formatted image views mapping to swapchain images.
| VkRenderPass SwapchainManager::renderPass = VK_NULL_HANDLE |
Main render pass associated with swapchain frames.
| VkSwapchainKHR SwapchainManager::swapchain = VK_NULL_HANDLE |
Vulkan swapchain handle.