Skip to content

Commit e926451

Browse files
committed
Update deltaTime each frame
1 parent 8355e90 commit e926451

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/Processing.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3941,6 +3941,7 @@ void PApplet::run(){
39413941
auto frameEnd = ::std::chrono::steady_clock::now();
39423942
double fullFrame = ::std::chrono::duration<double>(frameEnd - last).count();
39433943
if (fullFrame > 0) _frameRate = (float)(1.0 / fullFrame);
3944+
deltaTime = (float)fullFrame;
39443945
last = frameEnd;
39453946
}
39463947
if(phongProg){glDeleteProgram(phongProg);phongProg=0;}

0 commit comments

Comments
 (0)