sorry, leftover bug fixed
This commit is contained in:
parent
78177483b5
commit
144226af51
1 changed files with 6 additions and 5 deletions
|
@ -202,6 +202,11 @@ void RasterizerGLES3::begin_frame() {
|
||||||
|
|
||||||
time_total += delta;
|
time_total += delta;
|
||||||
|
|
||||||
|
if (delta == 0) {
|
||||||
|
//to avoid hiccups
|
||||||
|
delta = 0.001;
|
||||||
|
}
|
||||||
|
|
||||||
prev_ticks = tick;
|
prev_ticks = tick;
|
||||||
|
|
||||||
double time_roll_over = GLOBAL_GET("rendering/limits/time/time_rollover_secs");
|
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[2] = Math::fmod(time_total, 900);
|
||||||
storage->frame.time[3] = Math::fmod(time_total, 60);
|
storage->frame.time[3] = Math::fmod(time_total, 60);
|
||||||
storage->frame.count++;
|
storage->frame.count++;
|
||||||
storage->frame.delta = double(tick - storage->frame.prev_tick) / 1000000.0;
|
storage->frame.delta = delta;
|
||||||
if (storage->frame.prev_tick == 0) {
|
|
||||||
//to avoid hiccups
|
|
||||||
storage->frame.delta = 0.001;
|
|
||||||
}
|
|
||||||
|
|
||||||
storage->frame.prev_tick = tick;
|
storage->frame.prev_tick = tick;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue