Explorar el Código

sokol_app.h, sokol_time.h: update header documentation

Andre Weissflog hace 3 años
padre
commit
9b1b387c02
Se han modificado 2 ficheros con 6 adiciones y 0 borrados
  1. 4 0
      sokol_app.h
  2. 2 0
      sokol_time.h

+ 4 - 0
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)

+ 2 - 0
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: