example: Refactor event loop handling for continuous redraw#542
example: Refactor event loop handling for continuous redraw#542MarijnS95 merged 2 commits intoash-rs:masterfrom
Conversation
Fixes hangs in case of non-Mailbox present modes.
|
Per winit's docs, |
|
In addition, |
MarijnS95
left a comment
There was a problem hiding this comment.
Thanks @msiglreith! After all these changes I'd rename this PR (= the resulting title of the squash-merge commit) to something like "process all events before rendering a frame" and also work in the switch over to "polling" instead of sometimes blocking until any (unrelated to rendering) event. I'll leave the details of that to you unless you prefer me to change it.
|
@MarijnS95 I tried to fine a better title, feel free to adjust :D |
|
Yeah, I think that perfectly covers it without giving away too much of the (here unnecessary) implementation details, thanks! |
Fixes hangs in case of non-mailbox present modes. I assume acquiring an image from the swapchain hangs when redrawing unconditionally on each incoming event. See rust-windowing/winit#2127 and #541
Tested on Windows with Nvidia gpu