pub fn new(instance: &VkInstance, window: &winit::Window) -> VkResult<VkSurface> {

        use crate::platforms::generate_surface;

        let handle = unsafe {
            generate_surface(&instance.entry, &instance.handle, window)
                .or(Err(VkError::unlink("Platform Surface")))?
        };

        let loader = ash::extensions::khr::Surface::new(&instance.entry, &instance.handle);

        let surface = VkSurface { handle, loader };
        Ok(surface)
    }
/// Initialize surface extension loader and `vk::Surface` object.
Initialize surface extension loader and `vk::Surface` object.
Initialize surface extension loader and ` vk :: Surface ` object .
pub fn new(instance: &VkInstance, window: &winit::Window) -> VkResult<VkSurface> {
        use crate::platforms::generate_surface;
        let handle = unsafe {
            generate_surface(&instance.entry, &instance.handle, window)
                .or(Err(VkError::unlink("Platform Surface")))?
        };
        let loader = ash::extensions::khr::Surface::new(&instance.entry, &instance.handle);
        let surface = VkSurface { handle, loader };
        Ok(surface)
    }
pub fn new ( instance : & VkInstance , window : & winit :: Window ) -> VkResult < VkSurface > { use crate :: platforms :: generate_surface ; let handle = unsafe { generate_surface ( & instance . entry , & instance . handle , window ) . or ( Err ( VkError :: unlink ( " " ) ) ) ? } ; let loader = ash :: extensions :: khr :: Surface :: new ( & instance . entry , & instance . handle ) ; let surface = VkSurface { handle , loader } ; Ok ( surface ) }
Initialize surface extension loader and `vk::Surface` object.
Initialize surface extension loader and ` vk :: Surface ` object .
instance
&VkInstance
window
&winit::Window
instance
&VkInstance
window
&winit::Window