-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
wgpu backend #19
Comments
Hello! A good place to start is probably to look at how the rendering is done for Glium: https://github.com/emilk/egui/blob/master/egui_glium/src/painter.rs |
So I've been working on my implementation here https://github.com/IceSentry/bevy_prototype_egui_plugin I was about to start the painter based on glium, but I keep getting a crash saying No fonts available. I've been looking everywhere in the glium examples and egui_glium and I can't figure out how fonts are loaded. |
Also, just to be sure. it seems like implementing App and Backend isn't actually required. Is this true or did I miss something? |
I figured out my font bug. It was an issue with the ordering of the update calls. |
You are correct!
|
I've added this section to README.md: You need to collect let mut egui_ctx = egui::Context::new();
// game loop:
loop {
let raw_input: egui::RawInput = my_backend.gather_input();
let mut ui = egui_ctx.begin_frame(raw_input);
my_app.ui(&mut ui); // add windows and widgets to `ui` here
let (output, paint_jobs) = egui_ctx.end_frame();
my_backend.paint(paint_jobs);
my_backend.set_cursor_icon(output.cursor_icon);
// Also see `egui::Output` for more
} |
I saw that, thank you, it was helpful. Now I just need to figure out how to draw the triangles in bevy and I think I'll be set. |
I just uploaded https://github.com/Gonkalbell/egui_wgpu, which is a pretty lazy port of the glium bindings. I haven't gotten around to uploading the documentation to docs.rs or publishing this to crates.io yet, but maybe you can find it useful. |
Oh cool, thanks, I'll look at it. I kind of stopped working on this. |
It seems like we have TWO wgpu backends for Egui now:
So I will consider this issue closed! |
I was trying to create a plugin for https://github.com/bevyengine/bevy and that would require a wgpu backend I think. I'd be interested in working on this, but I have no idea where to start.
The text was updated successfully, but these errors were encountered: