pub fn query_swap_chain_support(
    surface_and_extension: &SurfaceAndExtension, physical_device: vk::PhysicalDevice,
  ) -> SarektResult<SwapchainSupportDetails> {
    let surface = surface_and_extension.surface;
    let surface_functions = &surface_and_extension.surface_functions;

    let phys_d_surface_capabilities = unsafe {
      surface_functions.get_physical_device_surface_capabilities(physical_device, surface)?
    };
    let phys_d_formats =
      unsafe { surface_functions.get_physical_device_surface_formats(physical_device, surface)? };
    let phys_d_present_modes = unsafe {
      surface_functions.get_physical_device_surface_present_modes(physical_device, surface)?
    };

    Ok(SwapchainSupportDetails::new(
      phys_d_surface_capabilities,
      phys_d_formats,
      phys_d_present_modes,
    ))
  }
/// Retrieves the details of the swapchain's supported formats, present modes,
/// and capabilities.
Retrieves the details of the swapchain's supported formats, present modes,
and capabilities.
Retrieves the details of the swapchain ' s supported formats present modes and capabilities .
pub fn query_swap_chain_support(
    surface_and_extension: &SurfaceAndExtension, physical_device: vk::PhysicalDevice,
  ) -> SarektResult<SwapchainSupportDetails> {
    let surface = surface_and_extension.surface;
    let surface_functions = &surface_and_extension.surface_functions;
    let phys_d_surface_capabilities = unsafe {
      surface_functions.get_physical_device_surface_capabilities(physical_device, surface)?
    };
    let phys_d_formats =
      unsafe { surface_functions.get_physical_device_surface_formats(physical_device, surface)? };
    let phys_d_present_modes = unsafe {
      surface_functions.get_physical_device_surface_present_modes(physical_device, surface)?
    };
    Ok(SwapchainSupportDetails::new(
      phys_d_surface_capabilities,
      phys_d_formats,
      phys_d_present_modes,
    ))
  }
pub fn query_swap_chain_support ( surface_and_extension : & SurfaceAndExtension , physical_device : vk :: PhysicalDevice , ) -> SarektResult < SwapchainSupportDetails > { let surface = surface_and_extension . surface ; let surface_functions = & surface_and_extension . surface_functions ; let phys_d_surface_capabilities = unsafe { surface_functions . get_physical_device_surface_capabilities ( physical_device , surface ) ? } ; let phys_d_formats = unsafe { surface_functions . get_physical_device_surface_formats ( physical_device , surface ) ? } ; let phys_d_present_modes = unsafe { surface_functions . get_physical_device_surface_present_modes ( physical_device , surface ) ? } ; Ok ( SwapchainSupportDetails :: new ( phys_d_surface_capabilities , phys_d_formats , phys_d_present_modes , ) ) }
Retrieves the details of the swapchain's supported formats, present modes,
and capabilities.
Retrieves the details of the swapchain ' s supported formats present modes and capabilities .
surface_and_extension
&SurfaceAndExtension
physical_device
vk::PhysicalDevice
surface_and_extension
&SurfaceAndExtension
physical_device
vk::PhysicalDevice