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);