Skip to content
This repository was archived by the owner on Jun 18, 2021. It is now read-only.

Please add support for the new raw-window-handle crate #64

Closed
Lokathor opened this issue Aug 15, 2019 · 3 comments
Closed

Please add support for the new raw-window-handle crate #64

Lokathor opened this issue Aug 15, 2019 · 3 comments
Assignees

Comments

@Lokathor
Copy link

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 using raw-window-handle with this crate.

Tracking issue where this crate was discussed and crated if you have any questions: rust-gamedev/wg#26

@seivan
Copy link
Collaborator

seivan commented Aug 20, 2019

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!

@Lokathor
Copy link
Author

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.

@kvark kvark self-assigned this Aug 21, 2019
bors bot added a commit to gfx-rs/wgpu that referenced this issue Aug 21, 2019
301: Raw window handle support instead of winit r=grovesNL a=kvark

This removes `winit` and paves the way for gfx-rs/wgpu-rs#64

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
bors bot added a commit to gfx-rs/wgpu that referenced this issue Aug 21, 2019
301: Raw window handle support instead of winit r=grovesNL a=kvark

This removes `winit` and paves the way for gfx-rs/wgpu-rs#64

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
@kvark
Copy link
Member

kvark commented Sep 3, 2019

Fixed in #70

@kvark kvark closed this as completed Sep 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants