I am trying to simulate the flow of oil in the earth formation but am having difficulty with the time step. What I intend to do is to draw a frame, stop for 0.1 second and draw the second one. I have been trying to use the C++ clock_t command without much success. Any help is greatly appreciated. Thanks.
You can use glutTimerFunc( t=ms, routine, int number).
example
glutTimerFunc( 100, My_timer, 1);
void My_timer(int t_id)
{
// do stuff
glutTimerFunc( 100, My_timer, 1); // reset timer, timer function is a one shot timer. Will not be called again unless reset.
}
Originally posted by Suf:
[b]Hiya,
I am trying to simulate the flow of oil in the earth formation but am having difficulty with the time step. What I intend to do is to draw a frame, stop for 0.1 second and draw the second one. I have been trying to use the C++ clock_t command without much success. Any help is greatly appreciated. Thanks.