Replies: 1 comment
-
On W11; egui 0.29.1; winit 0.30.5
Winit seems to do a good job to not fire events when they fall outside the window or nothing is happening, but otherwise the usefulness of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, how to correctly request a winit::event::WindowEvent::RedrawRequested event when working with egui-winit integration?
I did this in the main event loop body:
Documentation is not really descriptive here, but in my understanding
egui_winit::EventResponse.repaint
is exactly what i need to call redraw when egui needs to.In winit 0.28 it kinda worked (but not perfect) but after updating egui to 0.25 and winit to 0.29 and rewriting many things, this way it redraws all the time now, cpu gets to 70-80% constantly. This is because
egui_winit::EventResponse.repaint
is almost always true, even when nothing happens (no animations playing in egui, mouse is not moving, etc). Is this a correct way to call redraws or is it some kind of WIP thing in egui-winit so not working as expected?Eframe demo on the other hand doesn't have this issue and don't consume CPU like this so I guess I'm just misunderstanding something. I'm looking for a simple way to know when to redraw and eframe code is too complicated for me to check how it is done there.
Beta Was this translation helpful? Give feedback.
All reactions