aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sokol_app.h4
-rw-r--r--sokol_time.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/sokol_app.h b/sokol_app.h
index 8b79e783..eb4de5c2 100644
--- a/sokol_app.h
+++ b/sokol_app.h
@@ -244,6 +244,10 @@
the default framebuffer size as float values instead of integer. This
may help to prevent casting back and forth between int and float
in more strongly typed languages than C and C++.
+
+ double sapp_frame_duration(void)
+ Returns the frame duration in seconds averaged over a number of
+ frames to smooth out any jittering spikes.
int sapp_color_format(void)
int sapp_depth_format(void)
diff --git a/sokol_time.h b/sokol_time.h
index 114e2903..2d4d4563 100644
--- a/sokol_time.h
+++ b/sokol_time.h
@@ -61,6 +61,8 @@
The main purpose of this function is to remove jitter/inaccuracies from
measured frame times, and instead use the display refresh rate as
frame duration.
+ NOTE: for more robust frame timing, consider using the
+ sokol_app.h function sapp_frame_duration()
Use the following functions to convert a duration in ticks into
useful time units: