Closed Lokathor closed 5 years ago
Maybe I'm missing something, but isn't most of them unimplemented for now? https://github.com/rust-windowing/raw-window-handle/blob/master/src/ios.rs
Edit: Oh I see, it's like a Facade for actual window makers, like Winit or SDL2. They fill in the missing pointers, and pass the enum to wgpu. Cool!
Yes.
the idea is (to use the gfx-hal terms since i don't know the wpgu terms), you'd have the end user be able to write
let surface = instance::create_surface(&window);
and all the stuff would be nearly as it is now, but wgpu wouldn't depend on winit::Window
, it'd depend on impl raw_window_handle::HasRawWindowHandle
.
Fixed in #70
Recently the gamedev-wg has been trying to make it easier for windowing libs and graphical libs to agree on a protocol for communication. This has resulted in the raw-window-handle crate, where the window offers up its OS window handle thingy to the graphical lib upon request and then the graphical lib is able to do its startup.
It seems like wgpu is mostly going through
wgn
and that's going through the gfx-backend stuff at the moment, that issue here would be a natural first step towards usingraw-window-handle
with this crate.Tracking issue where this crate was discussed and crated if you have any questions: https://github.com/rust-gamedev/wg/issues/26