mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
egui-wgpu: reduce input latency by defaulting to double-buffering
This makes a huge difference in perceived latency on my 60 Hz monitor on macOS on a native build. There is no difference on web though afaict. For me this is a much better default. Tearing is mildly annoying, but input latency makes an aplication feel sluggish.
This commit is contained in:
@@ -238,8 +238,8 @@ impl Default for WgpuConfiguration {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
present_mode: wgpu::PresentMode::AutoVsync,
|
present_mode: wgpu::PresentMode::AutoNoVsync, // double-buffered: low-latency, may have tearing
|
||||||
|
// present_mode: wgpu::PresentMode::AutoVsync, // triple-buffered: high-latency, no tearing
|
||||||
power_preference: wgpu::util::power_preference_from_env()
|
power_preference: wgpu::util::power_preference_from_env()
|
||||||
.unwrap_or(wgpu::PowerPreference::HighPerformance),
|
.unwrap_or(wgpu::PowerPreference::HighPerformance),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user