PDA

View Full Version : glutTimerFunc...strange results? or is it me



DJKAOS
06-06-2001, 06:46 PM
Trying to implement a time, it sorta worked but it starts out really slow and then after a few seconds its going super fast, out of control fast...then it slows down..seem random as hell to me. Is it my code?

void timefunc(int val)
{
if(headrotate >= 360) headrotate = headrotate - 360;
headrotate -= 5.0;
glutPostRedisplay();
glutTimerFunc(1000,timefunc,1);
}

And towards the end of my
Display function I have this line of code

glutTimerFunc(1000,timefunc,1);

DJKAOS
06-06-2001, 07:28 PM
Sorry for that last post, I figured it out..
I needed the
glutTimerFunc(.......);
in my Main() function instead of my display function..