vOOlkan
An object oriented approach to Vulkan
|
The present mode defines how the images of the swapchain are sent to the screen. More...
#include <SwapchainPresentMode.h>
Public Member Functions | |
PresentMode (const PhysicalDevice &realGpu, const WindowSurface &windowSurface, std::function< VkPresentModeKHR(const std::vector< VkPresentModeKHR > &)> chooseBestPresentMode=chooseBestPresentMode) | |
Creates a PresentMode object containing the best VkPresentModeKHR for this pair of physical GPU and window surface. More... | |
PresentMode ()=default | |
const VkPresentModeKHR & | operator+ () const |
Returns the underlying VkPresentModeKHR. More... | |
Static Public Member Functions | |
static bool | isThereAnAvailablePresentMode (const PhysicalDevice &realGpu, const WindowSurface &windowSurface) |
The present mode defines how the images of the swapchain are sent to the screen.
An object of this class will qury which present modes are available based on the GPU and window surface, and will chose the best one.
Vulkan::SwapchainOptions::PresentMode::PresentMode | ( | const PhysicalDevice & | realGpu, |
const WindowSurface & | windowSurface, | ||
std::function< VkPresentModeKHR(const std::vector< VkPresentModeKHR > &)> | chooseBestPresentMode = chooseBestPresentMode |
||
) |
Creates a PresentMode object containing the best VkPresentModeKHR for this pair of physical GPU and window surface.
The default function to choose the best present mode among the ones available will choose a present mode with VK_PRESENT_MODE_MAILBOX_KHR. If this is not available it will return a random present mode available.
realGpu | The Physical GPU. |
windowSurface | The OS window surface. |
chooseBestFormat | Optional function to choose the best present mode among the ones available. |
|
default |
|
static |
Checks whether there is an available present mode for this pair of GPU and window surface.
realGpu | The physical GPU. |
windowSurface | The window surface. |
const VkPresentModeKHR & Vulkan::SwapchainOptions::PresentMode::operator+ | ( | ) | const |
Returns the underlying VkPresentModeKHR.