Moved the idle callback out of glutMainLoopEvent() and into