PistonDevelopers / glfw-rs

GLFW3 bindings and idiomatic wrapper for Rust.
Apache License 2.0
645 stars 123 forks source link

raw-window-handle #427

Closed Lokathor closed 5 years ago

Lokathor commented 5 years ago

Hello everyone.

Recently the gamedev-wg has been working on trying to improve the gamedev scene for Rust, and one thing that we came up with was a way to slightly disconnect windowing libraries and graphical libraries by having them both work through a very small intermediary crate.

It has the very imaginative name of raw-window-handle.

Basically you make your Window type implement the HasRawWindowHandle trait, and that has a method which offers up a pointer to the OS handle for the window. Then the graphics library can get the pointer and initialize the graphics API in whatever way.

This protocol is currently supported in the winit 0.20-alpha, and we're working to also get it supported in 0.19 as well as in sdl2. We'd appreciate if the glfw crate could add this in the next release or two.

cloudhead commented 5 years ago

See https://github.com/PistonDevelopers/glfw-rs/issues/419

Lokathor commented 5 years ago

oh my gosh! i didn't see an issue open for it so i thought that i'd forgotten to put in an issue here. My apologies.