Skip to content

Commit

Permalink
get ios working
Browse files Browse the repository at this point in the history
  • Loading branch information
mtak- committed Jul 10, 2018
1 parent 67ace6b commit aef7b39
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vulkano-win/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ unsafe fn winit_to_surface(instance: Arc<Instance>, win: winit::Window)
Surface::from_anativewindow(instance, win.get_native_window(), win)
}

#[cfg(all(unix, not(target_os = "android"), not(target_os = "macos")))]
#[cfg(all(unix, not(target_os = "android"), not(target_os = "ios"), not(target_os = "macos")))]
unsafe fn winit_to_surface(instance: Arc<Instance>, win: winit::Window)
-> Result<Arc<Surface<winit::Window>>, SurfaceCreationError> {
use winit::os::unix::WindowExt;
Expand Down Expand Up @@ -158,6 +158,13 @@ unsafe fn winit_to_surface(instance: Arc<Instance>, win: winit::Window)
win)
}

#[cfg(target_os = "ios")]
unsafe fn winit_to_surface(instance: Arc<Instance>, win: winit::Window)
-> Result<Arc<Surface<winit::Window>>, SurfaceCreationError> {
use winit::os::ios::WindowExt;
Surface::from_ios_moltenvk(instance, win.get_uiview(), win)
}

#[cfg(target_os = "macos")]
unsafe fn winit_to_surface(instance: Arc<Instance>, win: winit::Window)
-> Result<Arc<Surface<winit::Window>>, SurfaceCreationError> {
Expand Down

0 comments on commit aef7b39

Please sign in to comment.