rust-windowing / winit

Window handling library in pure Rust
https://docs.rs/winit/
Apache License 2.0
4.86k stars 909 forks source link

Direct to Display? #1205

Open cheako opened 5 years ago

cheako commented 5 years ago

I'm looking into porting my application to the Nintendo Switch. I'm assuming if I can get Vulkan to work at all it would be via D2D. I did write a cpp app that used either GLFW or direct to display and I was able to abstract over the two APIs. For winit I don't see how it would be easy to do the same.

This question has two parts. The first is about winit's support of windowless environments and systemd's logind and open event devices is or would be supported.

The second is about the existence of other projects that might enable this. I had looked into Smithay and that's how I discovered the winit project.

Osspial commented 5 years ago

Winit doesn't currently support windowless environments. I remember seeing some talk within the last few months about supporting the Linux Framebuffer, but work on that hasn't started and I don't know what form that API would take. That wouldn't work on the Switch, but it's the closest thing I've seen to that.

I personally can't answer your question about related projects, unfortunately. AFAIK the main reason we need Smithay is because Wayland pushes more of the implementation onto the application than other platforms do, so I expect we'd write most of the implementation ourselves, but I'm not certain about that.

goddessfreya commented 5 years ago

I remember seeing some talk within the last few months about supporting the Linux Framebuffer, but work on that hasn't started and I don't know what form that API would take.

Likely this: https://github.com/rust-windowing/winit/issues/1006