fn create_surface(
        instance: &Instance,
        window: &glfw::Window,
    ) -> Result<vk::SurfaceKHR> {
        let mut surface_handle: u64 = 0;
        let result = window.create_window_surface(
            instance.ash.handle().as_raw() as usize,
            null(),
            &mut surface_handle,
        );
        if result != vk::Result::SUCCESS.as_raw() as u32 {
            bail!("unable to create the vulkan surface");
        }
        Ok(vk::SurfaceKHR::from_raw(surface_handle))
    }
/// Create a vulkan surface using the glfw to handle the platform-specific
/// setup.
Create a vulkan surface using the glfw to handle the platform-specific
setup.
Create a vulkan surface using the glfw to handle the platform - specific setup .
fn create_surface(
        instance: &Instance,
        window: &glfw::Window,
    ) -> Result<vk::SurfaceKHR> {
        let mut surface_handle: u64 = 0;
        let result = window.create_window_surface(
            instance.ash.handle().as_raw() as usize,
            null(),
            &mut surface_handle,
        );
        if result != vk::Result::SUCCESS.as_raw() as u32 {
            bail!("unable to create the vulkan surface");
        }
        Ok(vk::SurfaceKHR::from_raw(surface_handle))
    }
fn create_surface ( instance : & Instance , window : & glfw :: Window , ) -> Result < vk :: SurfaceKHR > { let mut surface_handle : u64 = 0 ; let result = window . create_window_surface ( instance . ash . handle ( ) . as_raw ( ) as usize , null ( ) , & mut surface_handle , ) ; if result != vk :: Result :: SUCCESS . as_raw ( ) as u32 { bail ! ( " " ) ; } Ok ( vk :: SurfaceKHR :: from_raw ( surface_handle ) ) }
Create a vulkan surface using the glfw to handle the platform-specific
setup.
Create a vulkan surface using the glfw to handle the platform - specific setup .
instance
&Instance
window
&glfw::Window