Function inexor::vulkan_renderer::wrapper::swapchains::choose_surface_format¶
Defined in File swapchain_utils.hpp
Function Documentation¶
-
VkSurfaceFormatKHR inexor::vulkan_renderer::wrapper::swapchains::choose_surface_format(std::span<const VkSurfaceFormatKHR> available_formats, std::span<const VkSurfaceFormatKHR> custom_format_prioriy_list = {})¶
Select a swapchain surface format.
Note
Design decision: It’s always nice to offer the caller the possibility to specify a custom list of prioritized values which will be used to choose a supported value from. If no custom format priority list is specified (it’s empty by default), an internal list will be selected as fallback. If the caller specifies a custom list, but none of the given values are supported by the system, an attempt to use the fallabck list will be carried out as well.
- Parameters:
available_formats – The surface formats which are available on the system.
custom_format_prioriy_list – A custom list of surface formats to choose from if available (empty by default).
- Returns:
The selected surface format.