parasyte / cartunes

Simple comparison app for iRacing car setups.
MIT License
56 stars 12 forks source link

Reactive draw mode #24

Open parasyte opened 2 years ago

parasyte commented 2 years ago

The GUI currently redraws every frame at the display's refresh rate (e.g. 180 fps on my 180 Hz monitor). Even if there are no changes between frames.

We can easily switch to a reactive mode by only redrawing when egui requests it: https://github.com/parasyte/cartunes/blob/2a3b98997e6e319d040f46bbddbbe7b5739e8d83/src/framework.rs#L150-L155