Skip to content

Commit

Permalink
Update commented vsync code in example to use present_mode (#4926)
Browse files Browse the repository at this point in the history
# Objective

- To fix the broken commented code in `examples/shader/compute_shader_game_of_life.rs` for disabling frame throttling

## Solution

- Change the commented code from using the old `WindowDescriptor::vsync` to the new `WindowDescriptor::present_mode`

### Note
I chose to use the fully qualified scope `bevy::window::PresentWindow::Immediate` rather than explicitly including `PresentWindow` to avoid an unused import when the code is commented.
  • Loading branch information
henryksloan committed Jun 4, 2022
1 parent 3a9383f commit 8e08e26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/shader/compute_shader_game_of_life.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn main() {
.insert_resource(ClearColor(Color::BLACK))
.insert_resource(WindowDescriptor {
// uncomment for unthrottled FPS
// vsync: false,
// present_mode: bevy::window::PresentMode::Immediate,
..default()
})
.add_plugins(DefaultPlugins)
Expand Down

0 comments on commit 8e08e26

Please sign in to comment.