Open
Description
I've created a simple app that renders long scrollable images grid with some animations and I'm really excited by performance of this library: on my laptop I got about 1500 FPS using glow backend. But there is one thing bothering me: CPU & GPU usage go up to 90% when I run my app, so I want to set FPS limit to save energy and get rid of cooler noise. For now I'm using std::thread::sleep
in update
function, but this solution doesn't seems clear.
Describe the solution you'd like
Since FPS limiting is not backend-dependent, we can add fps_limit(&self) -> Option<u32>
function to App
trait.
Describe alternatives you've considered
Also, we can add set_fps_limit(&self, limit: u32)
to Frame
, so it should be able to call it from App::setup
.