Skip to content

Bevy 0.7#79

Merged
vladbat00 merged 8 commits intovladbat00:mainfrom
aevyrie:bevy-main
Apr 16, 2022
Merged

Bevy 0.7#79
vladbat00 merged 8 commits intovladbat00:mainfrom
aevyrie:bevy-main

Conversation

@aevyrie
Copy link
Copy Markdown
Contributor

@aevyrie aevyrie commented Mar 8, 2022

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 reported needs_repaint, and sends a bevy RequestRedraw event. I've also updated the examples to use the new WinitSettings::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!

image

@aevyrie aevyrie changed the title Tracking bevy/main Bevy 0.7 Apr 15, 2022
@aevyrie
Copy link
Copy Markdown
Contributor Author

aevyrie commented Apr 15, 2022

@forbjok I merged your branch here to get the two_window example working. This branch has some additional integrations to work with the new low power mode in 0.7.

Comment thread Cargo.toml Outdated
Comment thread examples/simple.rs Outdated
.add_plugins(DefaultPlugins)
.insert_resource(WinitSettings::desktop_app())
.insert_resource(WindowDescriptor {
present_mode: PresentMode::Mailbox,
Copy link
Copy Markdown
Owner

@vladbat00 vladbat00 Apr 16, 2022

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?

Comment thread examples/ui.rs Outdated
Comment on lines +27 to +30
.insert_resource(WinitSettings::desktop_app())
.init_resource::<UiState>()
.add_plugins(DefaultPlugins)
.insert_resource(WinitSettings::desktop_app())
Copy link
Copy Markdown
Owner

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

@vladbat00
Copy link
Copy Markdown
Owner

Thanks a lot for the PR! I'll make a new release soon.

@vladbat00 vladbat00 mentioned this pull request Apr 16, 2022
@vladbat00 vladbat00 merged commit 011a4c2 into vladbat00:main Apr 16, 2022
@aevyrie
Copy link
Copy Markdown
Contributor Author

aevyrie commented Apr 16, 2022

@mvlabat something I added that could use more discussion was the present_mode and the WinitSettings for low power. Maybe these should be removed from the examples, and instead added to a dektop_app example or something. It would be good to discuss how you can use these settings to improve input latency and power use. People using this library for games probably won't want to use those settings.

HackerFoo pushed a commit to HackerFoo/bevy_egui that referenced this pull request Jul 16, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants