Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //lastFrameTime is an integer, which works as a boolean in C.
- if(!lastFrameTime){
- lastFrameTime = glutGet(GLUT_ELAPSED_TIME);
- }
- int now = glutGet(GLUT_ELAPSED_TIME);
- int elapsedMilliseconds = now - lastFrameTime;
- float deltaTime = elapsedMilliseconds / 1000.0f;
- lastFrameTime = now;
Advertisement
Add Comment
Please, Sign In to add comment