View Full Version : glutTimerFunc()?
beet6
01-18-2002, 05:51 PM
I used a timer to frequently call glutPostRedisplay() to show the scene dynamically. But only one frame was rendered, Could you tell me detailed usage of glutTimerFunc()?
Thanks
inside the func u call with glutTimerFunc
post another glutTimerFunc() call
ie glutTimerFunc will only get called once, it doesnt get called even Xseconds until u turn it off
beet6
01-18-2002, 06:17 PM
Sorry not surely got your point; did you mean, I have to use nested glutTimerFunc()?
void f()
{
do stuff
glutTimerFunc( f, 10 ); // call this function again in 10ms
}
int main()
{
glutTimerFunc( f, 10 );
}
beet6
01-19-2002, 07:24 PM
Thank you very much, I've got it done!!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.