Draft
Conversation
Want to include `SubApp` in a system function, but `ExclusiveFunctionSystem` requires `Sync`.
Moved the responsibility for running top-level schedules from `App` struct to the runner function.
Set `ControlFlow::WaitUntil` to the next tick update or redraw, whichever is closer. Prepare for changes in rust-windowing/winit#2900.
Send events for control from resource `WinitHandler`, which contains `EventLoopProxy`.
The top schedule was redefined so that fine control would not be impossible. - Schedule `Main` was split into `StartupFlow` and `UpdateFlow`. - The names of the sub-schedules (`Startup`, `Update`, etc.) have not been changed, so in many cases no migration is necessary. - Add `Control` schedule. - Each time an event is received from windows and devices, this schedule is run. - This is useful for responding to events regardless of whether tick updates take place. - Add `FrameReady` schedule. - Each time a frame is ready to be updated, this schedule is run. - This is the best place to decide whether to redraw. - Rename `Render` schedule to `RenderFlow`. Schedules that run sub-schedules are now named uniformly as `***Flow`.
c77e100 to
d2416a4
Compare
d2416a4 to
557408e
Compare
14 tasks
Contributor
|
I believe this will also fix #4669, right? |
Member
|
Should this PR be given priority over #8745 ? I'm starting to hit complex migrations on my PR, impacting event loop. |
|
@B-head I think you can remove the uncertainty of what time PR to adapt to. 2 of them are closed in favor of the last one. |
Contributor
|
Hi folks, I just wanted to share that I am interested in this feature as a way to manually control when to render: https://discord.com/channels/691052431525675048/1166887503454810132/1166887503454810132 Is there any interest or plan to continue with this PR, or it's doomed to be forgotten/closed? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request is stacked on #8976.
Resolves #1343, Resolves #5984, Resolves #9087, Fixes #5713, Fixes #8080, Fixes #9040, Closes #7611.
Objective
Code example here.
Solution
ControlFlow::WaitUntilto the next tick update or redraw, whichever is closer.WinitHandler, which containsEventLoopProxy.Redefine top schedules
The top schedule was redefined so that fine control would not be impossible.
Mainwas split intoStartupFlowandUpdateFlow.Startup,Update, etc.) have not been changed, so in many cases no migration is necessary.Controlschedule.FrameReadyschedule.Renderschedule toRenderFlow.Schedules that run sub-schedules are now named uniformly as
***Flow.To do
WinitHandler::run.Time. Candidates:FixedTimeandTimewhile fixing several problems #8964FixedTimeandTime(ver. B) (proof-of-concept) #8946Timeto support fast and slow running.Optimize VBlank wait locations that cause slow tick updates when VSync is enabled.(It didn't matter much)WinitSettings.unfocused_modeis set toUpdateMode::Reactive#7974.Known Issues
TextBundlerandomly fails to initialize the character textures.If you encounter any other issues, please let us know.
Changelog
To be written later.
Migration Guide
WinitHandler::runtoPostStartupschedule.WinitSettingshas been redefined in the rework.