set ctx.frame_duration
This commit is contained in:
parent
7a403c766e
commit
fad46137a0
@ -20,7 +20,6 @@ typedef struct Context {
|
||||
|
||||
/* real time spent on one frame (in seconds) */
|
||||
/* townengine is fixed step based, so you don't have to use delta */
|
||||
/* TODO: actually set it */
|
||||
float frame_duration;
|
||||
|
||||
/* it is disabled by having fog_density approximately equal to zero */
|
||||
|
@ -532,6 +532,7 @@ static bool initialize(void) {
|
||||
ctx.desired_frametime = ctx.clocks_per_second / ctx.ticks_per_second;
|
||||
ctx.frame_accumulator = 0;
|
||||
ctx.game.frame_number = 0;
|
||||
ctx.game.frame_duration = 1.0f / (float)ctx.ticks_per_second;
|
||||
|
||||
/* delta time averaging */
|
||||
ctx.delta_averager_residual = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user