How to make timedelay?
Hi! I hope somebody can help me understand how to make timedelays (with duration about 1-3 sec.), so as to get a figure to evolve in time.
btw. I use MS Visual C++ in combination with GLUT / OpenGL...
thanx!But I don't mean movement. Just kind of a figure getting bigger while you watch... like one kube exist and after 3 sec you see one more...and so on... will the same do? And how do you get frametime?
[edited by - Muffinwoman on March 18, 2003 11:47:03 AM]
[edited by - Muffinwoman on March 18, 2003 12:25:48 PM]
[edited by - Muffinwoman on March 18, 2003 12:27:31 PM]
[edited by - Muffinwoman on March 18, 2003 12:33:36 PM]
im guessing you have some kind of timing fuction for movement.
Just add a variable with the value 3 and then subtract with the frametime value and while the var is above 0 then freeze the frame.
Just add a variable with the value 3 and then subtract with the frametime value and while the var is above 0 then freeze the frame.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
use GetTickCount it checks the time from the system clock i think then you just check it every loop through the program and when it gets to 3000??? (i think its in mili secounds) from the original time update.
A man walks into a bar.....ouch!?! Ya get it, do ya huh huh well....awww I give up.
Sleep() is prolly what you're looking for.
[EDIT:] Except you wouldn't be able to "watch the figure getting bigger". You'd have to use GetTickCount() or timeGetTime() for that. You might also wanna look into the SetTimer function.
[edited by - AdmiralBinary on March 18, 2003 11:52:30 PM]
[EDIT:] Except you wouldn't be able to "watch the figure getting bigger". You'd have to use GetTickCount() or timeGetTime() for that. You might also wanna look into the SetTimer function.
[edited by - AdmiralBinary on March 18, 2003 11:52:30 PM]
Take a look at Nehe''s tutorial 21 it goes into how to use the Performance Time to get the milliseconds from you comp. This should help...
I'm don't know much but I can try to help... just email me at... Shadow_0f_Light@Yahoo.com(the '0' in 'Of' is a zero :P)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement