The surface format defines the properties of the image where we will draw, such as the color space.
More...
#include <SwapchainSurfaceFormat.h>
The surface format defines the properties of the image where we will draw, such as the color space.
◆ SurfaceFormat() [1/3]
Vulkan::SwapchainOptions::SurfaceFormat::SurfaceFormat |
( |
const PhysicalDevice & |
realGpu, |
|
|
const WindowSurface & |
windowSurface, |
|
|
std::function< VkSurfaceFormatKHR(const std::vector< VkSurfaceFormatKHR > &)> |
chooseBestFormat = chooseBestFormat |
|
) |
| |
Creates a SurfaceFormat object containing the best VkSurfaceFormatKHR for this pair of physical GPU and window surface.
The default function to choose the best format among the ones available will choose a format which supports VK_COLOR_SPACE_SRGB_NONLINEAR_KHR color space and VK_FORMAT_B8G8R8A8_SRGB format. If this is not available it will return a random format available.
- Parameters
-
realGpu | The Physical GPU. |
windowSurface | The OS window surface. |
chooseBestFormat | Optional function to choose the best format among the ones available. |
◆ SurfaceFormat() [2/3]
Vulkan::SwapchainOptions::SurfaceFormat::SurfaceFormat |
( |
VkSurfaceFormatKHR |
format | ) |
|
|
inline |
◆ SurfaceFormat() [3/3]
Vulkan::SwapchainOptions::SurfaceFormat::SurfaceFormat |
( |
| ) |
|
|
default |
◆ isThereAnAvailableSurfaceFormat()
bool Vulkan::SwapchainOptions::SurfaceFormat::isThereAnAvailableSurfaceFormat |
( |
const PhysicalDevice & |
realGpu, |
|
|
const WindowSurface & |
windowSurface |
|
) |
| |
|
static |
Checks whether there is an available surface format for this pair of GPU and window surface.
- Parameters
-
realGpu | The physical GPU. |
windowSurface | The window surface. |
- Returns
- Whether there is an available surface format for this pair of GPU and window surface.
◆ operator+()
const VkSurfaceFormatKHR & Vulkan::SwapchainOptions::SurfaceFormat::operator+ |
( |
| ) |
const |
Returns the underlying VkSurfaceFormat.
- Returns
- The underlying VkSurfaceFormat.
The documentation for this class was generated from the following files: