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

[Merged by Bors] - Disable Vsync for stress tests. #5187

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/stress_tests/many_cubes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ use bevy::{
diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin},
math::{DVec2, DVec3},
prelude::*,
window::PresentMode,
};

fn main() {
App::new()
.insert_resource(WindowDescriptor {
present_mode: PresentMode::Immediate,
..default()
})
.add_plugins(DefaultPlugins)
.add_plugin(FrameTimeDiagnosticsPlugin::default())
.add_plugin(LogDiagnosticsPlugin::default())
Expand Down
2 changes: 2 additions & 0 deletions examples/stress_tests/many_foxes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use bevy::{
diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin},
prelude::*,
window::PresentMode,
};

struct Foxes {
Expand All @@ -16,6 +17,7 @@ fn main() {
App::new()
.insert_resource(WindowDescriptor {
title: "🦊🦊🦊 Many Foxes! 🦊🦊🦊".to_string(),
present_mode: PresentMode::Immediate,
..default()
})
.add_plugins(DefaultPlugins)
Expand Down
3 changes: 2 additions & 1 deletion examples/stress_tests/many_lights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use bevy::{
pbr::{ExtractedPointLight, GlobalLightMeta},
prelude::*,
render::{camera::ScalingMode, RenderApp, RenderStage},
window::PresentMode,
};
use rand::{thread_rng, Rng};

Expand All @@ -16,7 +17,7 @@ fn main() {
width: 1024.0,
height: 768.0,
title: "many_lights".to_string(),
present_mode: bevy::window::PresentMode::Immediate,
present_mode: PresentMode::Immediate,
..default()
})
.add_plugins(DefaultPlugins)
Expand Down
5 changes: 5 additions & 0 deletions examples/stress_tests/many_sprites.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use bevy::{
math::Quat,
prelude::*,
render::camera::Camera,
window::PresentMode,
};

use rand::Rng;
Expand All @@ -17,6 +18,10 @@ const CAMERA_SPEED: f32 = 1000.0;

fn main() {
App::new()
.insert_resource(WindowDescriptor {
present_mode: PresentMode::Immediate,
..default()
})
// Since this is also used as a benchmark, we want it to display performance data.
.add_plugin(LogDiagnosticsPlugin::default())
.add_plugin(FrameTimeDiagnosticsPlugin::default())
Expand Down