Comments (10)
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.
from egui.
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
from egui.
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.
from egui.
Also, just to be sure. it seems like implementing App and Backend isn't actually required. Is this true or did I miss something?
from egui.
I figured out my font bug. It was an issue with the ordering of the update calls.
from egui.
it seems like implementing App and Backend isn't actually required
You are correct!
egui::app
is a model I introduced for writing backend agnostic apps. The goal is that you can write e.g. a calculator app that implements egui::app::App
and then easily compile it for different Egui backends that implements egui::app::Backend
(such as egui_glium
and egui_web
). It is still quite experimental.
from egui.
I've added this section to README.md:
You need to collect egui::RawInput
, paint egui::PaintJobs
and handle egui::Output
. The basic structure is this:
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
}
from egui.
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.
from egui.
Oh cool, thanks, I'll look at it. I kind of stopped working on this.
from egui.
It seems like we have TWO wgpu backends for Egui now:
- https://github.com/hasenbanck/egui_wgpu_backend (https://crates.io/crates/egui_wgpu_backend)
- https://github.com/Gonkalbell/egui_winit_wgpu (unpublished)
So I will consider this issue closed!
from egui.
Related Issues (20)
- Remove `id_source` parameter for ui.indent HOT 1
- error: no such command: `cranky` HOT 2
- The program screen flickers (shakes) when resizing.
- Suggest enabling the Viewport to be built on a user-specified monitor at launch time
- Issue with number key mapping part #2
- Universal clipboard shortcuts (`Ctrl`+`C`/`V`/`X`) don't work with non-Latin keyboard layouts
- Display parent viewport id Issues
- rfd 0.14 conflicts with eframe on macOS HOT 6
- error: implementation of `Deserialize` is not general enough HOT 1
- ViewportCommand::Visible(false) doesn't appear to do anything
- Immediate viewport would crash with ViewportBuilder settings `fullscreen` + `transparent` + `always_on_top` HOT 1
- Context menus are not very flexible.
- android persistence feature HOT 3
- Context menu: sub-menu don't disappear when hovering another, non-sub-menu item HOT 2
- Drag and Drop HOT 1
- Allow TextureLoader s that can return non-sized textures
- Drag and Drop HOT 2
- egui_winit still will not allow non-scaling with Windows set to anything but 100% display scale. HOT 1
- Incorrect mouse position due to `ctx.set_pixels_per_point`
- losing interaction when using winit's `drag()` function until clicking in egui again
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from egui.