-
Notifications
You must be signed in to change notification settings - Fork 264
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
Bevy 0.7 #79
Bevy 0.7 #79
Conversation
@forbjok I merged your branch here to get the |
examples/simple.rs
Outdated
use bevy_egui::{egui, EguiContext, EguiPlugin}; | ||
|
||
fn main() { | ||
App::new() | ||
.add_plugins(DefaultPlugins) | ||
.insert_resource(WinitSettings::desktop_app()) | ||
.insert_resource(WindowDescriptor { | ||
present_mode: PresentMode::Mailbox, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is PresentMode::Mailbox
needed in this example?
examples/ui.rs
Outdated
.insert_resource(WinitSettings::desktop_app()) | ||
.init_resource::<UiState>() | ||
.add_plugins(DefaultPlugins) | ||
.insert_resource(WinitSettings::desktop_app()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess one of these is redundant
Thanks a lot for the PR! I'll make a new release soon. |
@mvlabat something I added that could use more discussion was the |
* Upgrade to bevy main * Add mailbox vsync * Use Bevy 0.7 * Cleanup * Add missing desktop app settings * Fix cargo toml errors * Clean up the examples Co-authored-by: Forb.Jok <forbjok@gmail.com> Co-authored-by: mvlabat <mvlabat@gmail.com>
This is based on #78 for egui 0.17. If that is merged, I will rebase on main.
This branch will be used to track bevy/main until the next release.
The biggest upgrade is support for low power mode in bevy (bevyengine/bevy#3974). I've added a few lines to
process_output
that checks if egui has reportedneeds_repaint
, and sends a bevyRequestRedraw
event. I've also updated the examples to use the newWinitSettings::desktop_app()
mode for reactive rendering.This means bevy_egui apps can now use zero resources unless the user is providing input, or there is an egui animation in progress!