23 explicit Swapchain(
const VkExtent2D& t_Extent);
27 VkResult AquireNextImage(
const VkSemaphore& t_CompletedSemaphore);
29 VkResult QueuePresent(
const VkQueue& t_PresentQueue,
const VkSemaphore& t_WaitSemaphore);
35 void Recreate(
const VkExtent2D& t_Extent);
44 const VkExtent2D&
GetExtents()
const {
return m_Extents; }
47 const std::vector<VkImage>&
GetImages()
const {
return m_Images; }
49 const VkImage&
GetActiveImage()
const {
return m_Images[m_ActiveImageIndex]; }
53 const std::vector<VkImageView>&
GetImageViews()
const {
return m_ImageViews; }
57 VkSwapchainKHR m_SwapChain = VK_NULL_HANDLE;
74 void CreateResources();
79 void CreateImageViews();
98 VkSurfaceFormatKHR ChooseSwapChainSurfaceFormat(
const std::vector<VkSurfaceFormatKHR>& t_AvailableFormats);
108 VkPresentModeKHR ChooseSwapChainPresentMode(
const std::vector<VkPresentModeKHR>& t_AvialableFormats);
const VkExtent2D & GetExtents() const
Definition: SwapChain.h:44
const VkPresentModeKHR & GetPresentMode() const
Definition: SwapChain.h:43
const VkFormat & GetImageFormat() const
Definition: SwapChain.h:45
VkFormat m_ImageFormat
Definition: SwapChain.h:63
std::vector< VkSurfaceFormatKHR > Formats
Definition: SwapChain.h:11
VkExtent2D m_Extents
Definition: SwapChain.h:61
VkPresentModeKHR m_PresentMode
Definition: SwapChain.h:59
~Swapchain() noexcept
Definition: SwapChain.h:25
std::vector< VkPresentModeKHR > PresentModes
Definition: SwapChain.h:12
const size_t GetImageViewCount() const
Definition: SwapChain.h:52
Represents a swap chain that can be used throughout the program.
Definition: SwapChain.h:19
std::vector< VkImageView > m_ImageViews
Definition: SwapChain.h:69
const size_t GetImageCount() const
Definition: SwapChain.h:48
const UINT32 GetActiveImageIndex() const
Definition: SwapChain.h:50
std::vector< VkImage > m_Images
The images inside of the swap chain.
Definition: SwapChain.h:68
UINT32 m_ActiveImageIndex
Definition: SwapChain.h:65
VkSurfaceCapabilitiesKHR Capabilities
Definition: SwapChain.h:10
uint32_t UINT32
Definition: FlingTypes.h:10
const std::vector< VkImage > & GetImages() const
Definition: SwapChain.h:47
const VkSwapchainKHR & GetVkSwapChain() const
Definition: SwapChain.h:42
Definition: SwapChain.h:8
const std::vector< VkImageView > & GetImageViews() const
Definition: SwapChain.h:53
const VkImage & GetActiveImage() const
Definition: SwapChain.h:49