Turning off vsync makes input way smoother

This commit is contained in:
Simon Gellis 2024-11-30 21:56:33 -05:00
parent 5627e41835
commit 2cef67b129
1 changed files with 4 additions and 1 deletions

View File

@ -185,7 +185,10 @@ struct Viewport {
impl Viewport {
pub fn new(event_loop: &ActiveEventLoop, mut app: Box<dyn AppWindow>) -> Self {
let mut painter = egui_wgpu::winit::Painter::new(
egui_wgpu::WgpuConfiguration::default(),
egui_wgpu::WgpuConfiguration {
present_mode: wgpu::PresentMode::AutoNoVsync,
..egui_wgpu::WgpuConfiguration::default()
},
1,
None,
false,