Skip to content

Commit

Permalink
Change present mode on many_buttons and many_glyphs from Immediate to…
Browse files Browse the repository at this point in the history
… AutoNoVsync (bevyengine#8681)

# Objective

Fix the examples many_buttons and many_glyphs not working on the WebGPU
examples page. Currently they both fail with the follow error:

```
panicked at 'Only FIFO/Auto* is supported on web', ..../wgpu-0.16.0/src/backend/web.rs:1162:13
```

## Solution

Change `present_mode` from `PresentMode::Immediate` to
`PresentMode::AutoNoVsync`. AutoNoVsync seems to be common mode used by
other examples of this kind.
  • Loading branch information
marlyx authored May 25, 2023
1 parent 18f4a49 commit 48b3118
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/stress_tests/many_buttons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn main() {

app.add_plugins(DefaultPlugins.set(WindowPlugin {
primary_window: Some(Window {
present_mode: PresentMode::Immediate,
present_mode: PresentMode::AutoNoVsync,
..default()
}),
..default()
Expand Down
2 changes: 1 addition & 1 deletion examples/stress_tests/many_glyphs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn main() {
let mut app = App::new();
app.add_plugins(DefaultPlugins.set(WindowPlugin {
primary_window: Some(Window {
present_mode: PresentMode::Immediate,
present_mode: PresentMode::AutoNoVsync,
..default()
}),
..default()
Expand Down

0 comments on commit 48b3118

Please sign in to comment.