BillyDM / egui-baseview

A baseview backend for the egui Rust GUI library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vsync does not work correctly

AquaEBM opened this issue · comments

On Windows, the window view gets repainted at thousands of frames per second, resulting in huge CPU usage, in spite of having set WindowOpenOptions.gl_config.vsync to true. I think the problem might be in how renders are scheduled in WindowHandler::on_frame but I haven't investigated enough yet. For now, one can mitigate this by calling thread::sleep in the update closure of a window but the precision of thread::sleep on windows is terrible.

Closing this issue as it seems egui-baseview isn't the only integration getting this problem, so it doesn't seem come from egui-baseview. Could always reopen it if the issue persists even after (this issue in the main egui repo) gets fixed.