forked from gfx-rs/gfx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from .run_forever() to .poll_events()
This commit uses `.poll_events()` to allow processing multiple events per rendered frame. (Before, only one event was processed per frame.) This is necessary because it's easy for the user to generate events much faster than frames can be rendered (e.g. by moving the mouse). Additionally, with `.run_forever()`, rendering blocked on receiving events. (An event had to occur before a frame was rendered.) In order to see an animation such as the `particle` example, the user had to generate events fast enough to cause frames to be rendered (e.g. by moving the mouse over the window). See also rust-windowing/winit#276 and rust-windowing/winit#231
- Loading branch information
1 parent
eb3f2c8
commit 7af125f
Showing
1 changed file
with
27 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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