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

Type-information handle #53

Closed
msiglreith opened this issue Aug 12, 2020 · 1 comment
Closed

Type-information handle #53

msiglreith opened this issue Aug 12, 2020 · 1 comment

Comments

@msiglreith
Copy link
Member

Proposal

Expose following enum to only provide information about the window handle type, not the actual handle and a corresponding interface in the RawWindowHandle trait:

enum RawWindowHandleTy {
      AndroidHandle,
      X11Handle,
      WaylandHandle,
      WindowsHandle,
      ...
}

Motivation

On Android, it's not possible to gather the RawWindowHandle immediately after creation. At least for winit it can only be queried once certain events have been received in the event loop. This imposes restrictions for client apis, which relay on the information provided by the RawWindowHandle early on. I'm particular case it's related to deriving the required surface extensions for Vulkan WSI. Ideally, this could be soley derived from the introduced RawWindowHandleTy above as some platforms support multiple different WSI approaches.

Cons

  • Breaking API changes
  • Feels a bit like a bandaid but I'm currently lacking a better idea /:

Some more details and discussion over at winit: rust-windowing/winit#1624

@msiglreith
Copy link
Member Author

Replaced by #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant