Function inexor::vulkan_renderer::wrapper::swapchains::choose_transform

Function Documentation

VkSurfaceTransformFlagBitsKHR inexor::vulkan_renderer::wrapper::swapchains::choose_transform(const VkSurfaceCapabilitiesKHR &caps, VkSurfaceTransformFlagsKHR requested_transform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR)

Select a swapchain pre transform.

Note

Design decision: It makes no sense to turn this into a function which takes a priority list, because in almost all cases, we would like to have VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR anyways. Offering a priority list here makes no sense here because it implies that we want to have various rotations of the surface with varying level of acceptance.

Parameters:
  • caps – The capabilities of the used surface.

  • requested_transform – The requested transform (VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR by default).

Returns:

The selected swapchain transform.