1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -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:
Emil Ernerfeldt
2023-12-18 13:19:04 +01:00
parent 8503a85113
commit c482a0b469

View File

@@ -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()
.unwrap_or(wgpu::PowerPreference::HighPerformance),