tuupola / hagl

Hardware Agnostic Graphics Library for embedded
https://www.appelsiini.net/tags/hagl/
MIT License
303 stars 49 forks source link

Add possibility to use multiple fps counters #69

Closed tuupola closed 2 years ago

tuupola commented 2 years ago
fps_instance_t fps;
fps_init(&fps);

...

while (1) {
    render_scene();
    hagl_flush(display);
    fps_update(&fps);
    printf("%f fps\r\n", fps.current);
};

You can also reset the counter back to zero.

fps_reset(&fps);