Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1822: Switch from .run_forever() to .poll_events() in gfx_app r=kvark a=jturner314 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 PR checklist: - [ ] `make` succeeds (on *nix) I don't see a Makefile. `make` says `make: *** No targets specified and no makefile found. Stop.` - [ ] `make reftests` succeeds I don't see a Makefile. I did run `cargo test`, though, and that succeeded (although it ran only 3 tests). - [X] tested examples with the following backends: When I run `glxinfo`, I see `OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.3.3`. I tested all of the examples. They all worked correctly, except `terrain_tessellated` (which failed to build even before this commit) and `triangle` (which still has the `.run_forever()` issue since it doesn't use `gfx_app`).
- Loading branch information