Daniel McNab
abfe9fbb56
Add a stats display for scene complexity ( #322 )
2023-05-18 18:50:57 +01:00
Arman Uguray
703d22f4b7
[frame_stats] Use match statement for color coding graph
2023-03-21 15:29:16 -07:00
Arman Uguray
6f3051837f
[frame_stats] Adapt the graph scale based on the current mean frame time
...
This allows the graph to display at a reasonable scale in the face of
fluctuations and a max recorded sample that is much larger than the
current average.
2023-03-21 15:16:45 -07:00
Arman Uguray
e6f4f6de57
[frame_stats] Draw thresholds for 16.66ms, 33.33ms, and 8.33 timings
...
Also added color coding for the bar graph based on these thresholds.
2023-03-21 11:38:38 -07:00
Arman Uguray
5ba2826460
[frame_stats] Scale the frame time graph linearly
...
The sqrt scale doesn't add much value any more since the max frame time
can be reset with a keypress.
2023-03-21 11:34:33 -07:00
Arman Uguray
1250cdcf86
[frame_stats] Add a VSync toggle key; show the current VSync state in stats UI
2023-03-21 11:34:08 -07:00
Arman Uguray
306aeab6df
[frame_stats] Key binding to clear min/max frame time; address review comments
2023-03-21 11:34:01 -07:00
Arman Uguray
1ac4a4f1a8
[frame_stats] Draw a live plot of frame time samples
...
Also abandoned the FrameScope idea and revised the `Stats::add_sample`
to accept a struct to accept a variety of future measurements.
2023-03-21 11:33:50 -07:00
Arman Uguray
bacaeebcb6
[frame_stats] Show viewport resolution on the stats layer
...
Also set the stats layer toggle to be on by default until we add some UI
to toggle it on mobile.
2023-03-21 11:33:43 -07:00
Arman Uguray
d7bacbcc3f
[frame_stats] Build stats layer layout based on viewport dimensions
2023-03-21 11:33:35 -07:00
Arman Uguray
89fb1b89da
[frame_stats] Add frame statistics UI to with_winit example
...
Added a module for frame time statistics and UI layer that displays
the average, minimum, and maximum frame time alongside FPS. The UI
can be toggled by pressing the `S` key.
2023-03-21 11:33:22 -07:00