Rotate camera without the idle function

Noob question…can anyone please tell me how to do this without the idle function…

void idle(){
rY += 0.05;


i want to be able to rotate the camera continously while the display function is running but without the idle function.

thank you

sorry fixed it…

how did you do fix it?

void timer(int v) {
  if (animate) {
    rY2 += 0.05;
    if (rY2 > 360.0) {
      rY2 -= 360.0;
  glutTimerFunc(1000/FPS, timer, v);

then in your main instead of glutIdleFunction(idle)

just put glutTimerFunc(100, timer, 0);

declare FPS and set as 60 or anything you want…hope it helps