Disable Vsync for stress tests. (#5187)
# Objective Currently stress tests are vsynced. This is undesirable for a stress test, as you want to run them with uncapped framerates. ## Solution Ensure all stress tests are using PresentMode::Immediate if they render anything.
This commit is contained in:
parent
33f9b3940d
commit
72e7358636
@ -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())
|
||||
|
@ -4,6 +4,7 @@
|
||||
use bevy::{
|
||||
diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin},
|
||||
prelude::*,
|
||||
window::PresentMode,
|
||||
};
|
||||
|
||||
struct Foxes {
|
||||
@ -16,6 +17,7 @@ fn main() {
|
||||
App::new()
|
||||
.insert_resource(WindowDescriptor {
|
||||
title: "🦊🦊🦊 Many Foxes! 🦊🦊🦊".to_string(),
|
||||
present_mode: PresentMode::Immediate,
|
||||
..default()
|
||||
})
|
||||
.add_plugins(DefaultPlugins)
|
||||
|
@ -7,6 +7,7 @@ use bevy::{
|
||||
pbr::{ExtractedPointLight, GlobalLightMeta},
|
||||
prelude::*,
|
||||
render::{camera::ScalingMode, RenderApp, RenderStage},
|
||||
window::PresentMode,
|
||||
};
|
||||
use rand::{thread_rng, Rng};
|
||||
|
||||
@ -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)
|
||||
|
@ -9,6 +9,7 @@ use bevy::{
|
||||
math::Quat,
|
||||
prelude::*,
|
||||
render::camera::Camera,
|
||||
window::PresentMode,
|
||||
};
|
||||
|
||||
use rand::Rng;
|
||||
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user