1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-09-20 07:54:46 +00:00
QB64-PE/internal
Matthew Kilgore cdbfb94c61 Fix GLUT redraw timing
Currently the GLUT thread draws the screen too slowly, Ex. The default
is supposed to be 60 FPS, but it will always draw a bit slower than 60
FPS. This is because the current logic simply inserts delays for the
entire length of a frame, not taking into account how long it took us to
render the last frame.

The new code uses GetTicks() to measure how much time has passed since
the last render, which then lets us calculate the exact amount of delay
until the next frame. We additionally then measure how long the delay
lasted vs. what we asked for (since any delay we do only has a minimum
guarentee, it will ocassionally last a bit longer) and adjust based on
that as well. The result is a perfect 60 FPS as long as rendering is
quick enough.

If the rendering falls behind (Ex. a slow _GL SUB is in the program)
then we'll start skipping frames to get back on track.

Fixes: #408
2024-04-17 00:58:30 -04:00
..
c Fix GLUT redraw timing 2024-04-17 00:58:30 -04:00
source Automatic update of ./internal/source 2024-04-10 17:52:08 +00:00
support 5.) Unify internal $COLOR includes 2024-02-07 21:27:14 +01:00
temp Corrected OSX setup script to use OSX folder instead of Linux one. 2015-12-14 11:17:09 +11:00
version.txt Supply a default version label when no version has been calculated 2022-05-20 16:57:45 -04:00