Sun, 01 Feb 2026 14:07:11 +0100
fix that the text for the counters was not updated every frame
| demo/snake/snake.c | file | annotate | diff | comparison | revisions |
--- a/demo/snake/snake.c Sun Feb 01 13:58:07 2026 +0100 +++ b/demo/snake/snake.c Sun Feb 01 14:07:11 2026 +0100 @@ -171,19 +171,15 @@ static void fps_counter_update(AscBehavior *behavior) { asc_ptr_cast(AscText, node, behavior->node); - static float last_fps = 0.f; - if (fabsf(asc_context.frame_rate - last_fps) > 1) { - last_fps = asc_context.frame_rate; - asc_text_printf(node, - "%.2f FPS\n" - "%llu draw calls\n" - "%llu triangles\n" - "%llu vertices", - asc_context.frame_rate, - asc_active_glctx->counters.draw_calls, - asc_active_glctx->counters.triangles_rendered, - asc_active_glctx->counters.vertices_rendered); - } + asc_text_printf(node, + "%.2f FPS\n" + "%llu draw calls\n" + "%llu triangles\n" + "%llu vertices", + asc_context.frame_rate, + asc_active_glctx->counters.draw_calls, + asc_active_glctx->counters.triangles_rendered, + asc_active_glctx->counters.vertices_rendered); } static void fps_counter_tie_to_corner(AscBehavior *behavior) {