Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

separate winit and wgpu backends #2

Open
Gonkalbell opened this issue Oct 11, 2020 · 3 comments
Open

separate winit and wgpu backends #2

Gonkalbell opened this issue Oct 11, 2020 · 3 comments

Comments

@Gonkalbell
Copy link
Owner

It would be nice to separate the windowing and graphics backends, just like how imgui provide separates its backends. This will allow people to mix and match different backends.

@hasenbanck
Copy link

Hi. Have a look at these both crates that haven't been published yet:

https://github.com/hasenbanck/egui_wgpu_backend

https://github.com/hasenbanck/egui_winit_platform

Are these what you have in mind? I couldn't work wit the current backends, since they inversed the control over my app structure, so I had to write them on my own.

@Gonkalbell
Copy link
Owner Author

Looks good, overall. The example looks a bit more verbose because you didn't use egui::app::Backend trait & scaffolding around it, but I don't think there's a easy way to use that trait and keep the windowing platform and graphics api separate. And like you said, it inverses control of the app structure, so I think I like this divide better.

Also, looks like you already updated it to support egui = 0.2. I still haven't gotten around to that yet.

@hasenbanck
Copy link

Yeah, the inversion of control was the biggest pain point, which prevented me from using it in my current project. There is of course more scaffolding, but it's a tradeoff. Most likely there is also room for traditional backend like the web or glium backend with wgpu and winit.

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

No branches or pull requests

2 participants