}
}
- #if DEBUG { updates_this_frame += 1; }
+ #if DEBUG { events_this_frame += 1; }
}
}
}
#if DEBUG {
- Debug_Info_Font_Size :: 32;
-
- fps_buffer : [24] u8;
- fps_str := conv.str_format("%i %i", ~~ fps_buffer, fps, updates_this_frame);
+ Debug_Info_Font_Size :: 16;
gfx.set_texture();
gfx.rect(.{ 0, 0 }, .{ 160, 36 }, .{0,0,0,.8});
- ui.draw_text(fps_str, 0, 0, ~~Debug_Info_Font_Size, .{0,1,0});
- updates_this_frame = 0;
+ str_buffer : [32] u8;
+ conv.str_format("FPS: %i", ~~ str_buffer, fps) |> ui.draw_text(0, 0, ~~Debug_Info_Font_Size, .{0,1,0});
+ conv.str_format("Events: %i", ~~ str_buffer, events_this_frame) |> ui.draw_text(0, 20, ~~Debug_Info_Font_Size, .{0,1,0});
+
+ events_this_frame = 0;
}
gfx.flush();
fps_timer := 1.0f
frames := 0
- updates_this_frame := 0
+ events_this_frame := 0
}