Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change run_forever() to poll_events() #122

Closed
wants to merge 3 commits into from
Closed

Change run_forever() to poll_events() #122

wants to merge 3 commits into from

Conversation

psincf
Copy link
Contributor

@psincf psincf commented Apr 8, 2019

Due to rust-windowing/winit#276, run_forever() can slow the program.
Because the presentation mode of the swap chain is FIFO, when get_next_texture() is called, it is waiting for the next refresh. If the amout of event per second is superior to the refresh rate, the whole program accumulate event, and closing the window can take a lot of time.
poll_events() prevents this.

See also rust-windowing/winit#459

@kvark
Copy link
Member

kvark commented Apr 22, 2019

Looks good, thank you!
Please clean up the commits for us to proceed (clear commit message, only one commit).

@psincf
Copy link
Contributor Author

psincf commented Apr 22, 2019

@kvark

Looks good, thank you!
Please clean up the commits for us to proceed (clear commit message, only one commit).

I made some mistakes with this PR, and I am unable to modify the commits ( branch deleted ). Here is a new and proper PR #128

@psincf psincf closed this Apr 22, 2019
bors bot added a commit that referenced this pull request Apr 22, 2019
128: Fix winit event loop in the triangle example r=kvark a=psincf

It's the refactored #122 PR

Co-authored-by: psincf <44228825+psincf@users.noreply.github.com>
mitchmindtree pushed a commit to mitchmindtree/wgpu that referenced this pull request Feb 23, 2020
122: Wholesome update for the git master of wgpu-native r=grovesNL a=kvark

Depends on gfx-rs#382

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
kvark added a commit to kvark/wgpu that referenced this pull request Jun 3, 2021
122: Wholesome update for the git master of wgpu-native r=grovesNL a=kvark

Depends on gfx-rs#382

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Patryk27 pushed a commit to Patryk27/wgpu that referenced this pull request Nov 23, 2022
format

major refactor


Change spirv to spirv_headers


Remove files


First translation to naga + format


Fix Int Constant error


Don't add unnecessary blocks.


Some cleanups


format


remove constructs


docs


fix debug leftovers


format, clippy


satisfy clippy
RandyMcMillan pushed a commit to RandyMcMillan/wgpu that referenced this pull request Jun 19, 2024
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.

2 participants