Skip to content

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

@Lokathor

Description

@Lokathor

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions