void Timer(int m) { // implement your functionality here glutPostRedisplay(); // once again we tell the library to call our Timer function after next 1000/FPS glutTimerFunc(1000.0 / FPS, Timer,0); }