Skip to content

Commit

Permalink
sokol_app.h, sokol_time.h: update header documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Dec 27, 2021
1 parent 693f2eb commit 9b1b387
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sokol_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions sokol_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9b1b387

Please sign in to comment.