diff options
Diffstat (limited to 'examples/pugl_shader_demo.c')
-rw-r--r-- | examples/pugl_shader_demo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/pugl_shader_demo.c b/examples/pugl_shader_demo.c index 63a86ab..178278b 100644 --- a/examples/pugl_shader_demo.c +++ b/examples/pugl_shader_demo.c @@ -433,7 +433,8 @@ updateTimeout(const PuglTestApp* const app) const int refreshRate = puglGetViewHint(app->view, PUGL_REFRESH_RATE); const double now = puglGetTime(app->world); const double nextFrameEndTime = app->lastFrameEndTime + (1.0 / refreshRate); - const double nextExposeTime = nextFrameEndTime - app->lastDrawDuration; + const double neededTime = 1.5 * app->lastDrawDuration; + const double nextExposeTime = nextFrameEndTime - neededTime; const double timeUntilNext = nextExposeTime - now; return timeUntilNext; |