Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Lokathor opened this issue Aug 15, 2019 · 4 comments · Fixed by #3038
Closed

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

Lokathor opened this issue Aug 15, 2019 · 4 comments · Fixed by #3038

Comments

@Lokathor
Copy link
Contributor

Lokathor commented Aug 15, 2019

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.

  • This would affect each backend.
  • It's a strict superset of the winit feature, so this can be released as a 0.3.1
  • Instead of having the winit feature allow for the pub fn create_surface(&self, window: &winit::window::Window) -> Surface method, you simply unconditionally have a pub fn create_surface(&self, has_handle: &impl raw_window_handle::HasRawWindowHandle) -> Surface method. Then you call for the raw window handle, match on it, and then re-dispatch to the correct actual method just like before.
  • After this the winit feature can eventually be removed in 0.4 EDIT: only if the raw-window-handle crate ends up supporting the web platform by then (which is up in the air at this time).

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

@simonrepp
Copy link
Contributor

If I'm not mistaken #2915 also refers to this, this has more info though! 👍

@Lokathor
Copy link
Contributor Author

Ah! indeed, missed it because it was so long ago and ossipal just published the crate a bit ago so i figured there wasn't an older issue farther back.

@zakarumych
Copy link

To remove winit feature in 0.4 raw-window-handle would need to support web platform.

@jamsch0
Copy link
Contributor

jamsch0 commented Aug 20, 2019

I started looking at this the other night (focusing on the Vulkan backend first), but it looks like Android support will be needed in raw-window-handle (already raised here).

I will do some more work and open a draft PR at some point this week.

EDIT: Done (#2967).

bors bot added a commit that referenced this issue Aug 21, 2019
2968: [hal-0.3] Add support for `raw-window-handle` r=kvark a=jchapman127

Fixes #2956.
Closes #2967.
PR checklist:
- [ ] `make` succeeds (on *nix)
- [ ] `make reftests` succeeds
- [ ] tested examples with the following backends:
- [x] `rustfmt` run on changed code

Non-breaking change version of #2967.

Currently Android is not supported in raw-window-handle and therefore unimplemented in gfx-backend-vulkan - waiting on rust-windowing/raw-window-handle#12 to be resolved.

Co-authored-by: James Chapman <jchapman3000@gmail.com>
bors bot added a commit that referenced this issue Aug 21, 2019
2968: [hal-0.3] Add support for `raw-window-handle` r=kvark a=jchapman127

Fixes #2956.
Closes #2967.
PR checklist:
- [ ] `make` succeeds (on *nix)
- [ ] `make reftests` succeeds
- [ ] tested examples with the following backends:
- [x] `rustfmt` run on changed code

Non-breaking change version of #2967.

Currently Android is not supported in raw-window-handle and therefore unimplemented in gfx-backend-vulkan - waiting on rust-windowing/raw-window-handle#12 to be resolved.

Co-authored-by: James Chapman <jchapman3000@gmail.com>
bors bot added a commit that referenced this issue Aug 23, 2019
2968: [hal-0.3] Add support for `raw-window-handle` r=kvark a=jchapman127

Closes #2956.
PR checklist:
- [x] `make` succeeds (on *nix)
- [x] `make reftests` succeeds
- [ ] tested examples with the following backends:
- [x] `rustfmt` run on changed code

Non-breaking change version of #2967.

Currently Android is not supported in raw-window-handle and therefore unimplemented in gfx-backend-vulkan - waiting on rust-windowing/raw-window-handle#12 to be resolved.

Co-authored-by: James Chapman <jchapman3000@gmail.com>
@bors bors bot closed this as completed in fb76260 Oct 9, 2019
@bors bors bot closed this as completed in #3038 Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment