diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-08-08 08:31:34 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-08-08 08:31:34 -0300 |
commit | 144226af51bf57f960e8c3e5415c8017dae3a176 (patch) | |
tree | ea2fd615c962214cca595cd88b2015ca4a414214 /drivers | |
parent | 78177483b551e5d5cf052c9c0af002519b3911c4 (diff) |
sorry, leftover bug fixed
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/rasterizer_gles3.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index 0f3f02afbe..e025992c0b 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -202,6 +202,11 @@ void RasterizerGLES3::begin_frame() { time_total += delta; + if (delta == 0) { + //to avoid hiccups + delta = 0.001; + } + prev_ticks = tick; double time_roll_over = GLOBAL_GET("rendering/limits/time/time_rollover_secs"); @@ -213,11 +218,7 @@ void RasterizerGLES3::begin_frame() { storage->frame.time[2] = Math::fmod(time_total, 900); storage->frame.time[3] = Math::fmod(time_total, 60); storage->frame.count++; - storage->frame.delta = double(tick - storage->frame.prev_tick) / 1000000.0; - if (storage->frame.prev_tick == 0) { - //to avoid hiccups - storage->frame.delta = 0.001; - } + storage->frame.delta = delta; storage->frame.prev_tick = tick; |