Represents a swap chain that can be used throughout the program.
More...
#include <SwapChain.h>
Represents a swap chain that can be used throughout the program.
- Note
- You must EXPLICITLY call Cleanup() on the swap chain
◆ Swapchain()
Fling::Swapchain::Swapchain |
( |
const VkExtent2D & |
t_Extent | ) |
|
|
explicit |
◆ ~Swapchain()
Fling::Swapchain::~Swapchain |
( |
| ) |
|
|
inlinenoexcept |
◆ AquireNextImage()
VkResult Fling::Swapchain::AquireNextImage |
( |
const VkSemaphore & |
t_CompletedSemaphore | ) |
|
◆ ChooseSwapChainPresentMode()
VkPresentModeKHR Fling::Swapchain::ChooseSwapChainPresentMode |
( |
const std::vector< VkPresentModeKHR > & |
t_AvialableFormats | ) |
|
|
private |
Choose a present mode for the swap chain based on the given formats.
Prefer VK_PRESENT_MODE_MAILBOX_KHR If none are available, than return VK_PRESENT_MODE_FIFO_KHR or VK_PRESENT_MODE_IMMEDIATE_KHR based on support
- Parameters
-
Vector | of available formats |
- Returns
- Preferred present mode from the available formats
◆ ChooseSwapChainSurfaceFormat()
VkSurfaceFormatKHR Fling::Swapchain::ChooseSwapChainSurfaceFormat |
( |
const std::vector< VkSurfaceFormatKHR > & |
t_AvailableFormats | ) |
|
|
private |
Choose a swap chain format based on the available formats.
Prefer to format that has VK_FORMAT_B8G8R8A8_UNORM and VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, otherwise get the first available.
- Parameters
-
Available | swap chain formats |
- Returns
- Best swap chain surface formate based on the available ones
◆ Cleanup()
void Fling::Swapchain::Cleanup |
( |
| ) |
|
Cleanup all swapchain resources.
◆ CreateImageViews()
void Fling::Swapchain::CreateImageViews |
( |
| ) |
|
|
private |
Create the image views from the swap chain so that we can actually render them.
◆ CreateResources()
void Fling::Swapchain::CreateResources |
( |
| ) |
|
|
private |
Create any swap chain resources (present mode, KGR swap chain)
◆ GetActiveImage()
const VkImage& Fling::Swapchain::GetActiveImage |
( |
| ) |
const |
|
inline |
◆ GetActiveImageIndex()
const UINT32 Fling::Swapchain::GetActiveImageIndex |
( |
| ) |
const |
|
inline |
◆ GetExtents()
const VkExtent2D& Fling::Swapchain::GetExtents |
( |
| ) |
const |
|
inline |
◆ GetImageCount()
const size_t Fling::Swapchain::GetImageCount |
( |
| ) |
const |
|
inline |
◆ GetImageFormat()
const VkFormat& Fling::Swapchain::GetImageFormat |
( |
| ) |
const |
|
inline |
◆ GetImages()
const std::vector<VkImage>& Fling::Swapchain::GetImages |
( |
| ) |
const |
|
inline |
◆ GetImageViewCount()
const size_t Fling::Swapchain::GetImageViewCount |
( |
| ) |
const |
|
inline |
◆ GetImageViews()
const std::vector<VkImageView>& Fling::Swapchain::GetImageViews |
( |
| ) |
const |
|
inline |
◆ GetPresentMode()
const VkPresentModeKHR& Fling::Swapchain::GetPresentMode |
( |
| ) |
const |
|
inline |
◆ GetVkSwapChain()
const VkSwapchainKHR& Fling::Swapchain::GetVkSwapChain |
( |
| ) |
const |
|
inline |
◆ QuerySwapChainSupport()
Check the swap chain support of a given device.
- Parameters
-
The | device to check support on |
- Returns
- Details of the the swap chain support on this device
◆ QueuePresent()
VkResult Fling::Swapchain::QueuePresent |
( |
const VkQueue & |
t_PresentQueue, |
|
|
const VkSemaphore & |
t_WaitSemaphore |
|
) |
| |
◆ Recreate()
void Fling::Swapchain::Recreate |
( |
const VkExtent2D & |
t_Extent | ) |
|
Recreate this swap chain including image views, render passes, and command buffers.
DOES NOT Clean up any resources.
◆ m_ActiveImageIndex
UINT32 Fling::Swapchain::m_ActiveImageIndex |
|
private |
◆ m_Extents
VkExtent2D Fling::Swapchain::m_Extents |
|
private |
◆ m_ImageFormat
VkFormat Fling::Swapchain::m_ImageFormat |
|
private |
◆ m_Images
std::vector<VkImage> Fling::Swapchain::m_Images |
|
private |
The images inside of the swap chain.
◆ m_ImageViews
std::vector<VkImageView> Fling::Swapchain::m_ImageViews |
|
private |
◆ m_PresentMode
VkPresentModeKHR Fling::Swapchain::m_PresentMode |
|
private |
◆ m_SwapChain
VkSwapchainKHR Fling::Swapchain::m_SwapChain = VK_NULL_HANDLE |
|
private |
The documentation for this class was generated from the following files: