OpenGl glutIdleFunc(void (*func)(void))
https://stackoverflow.com/questions/2542209
No correct solution
OTHER TIPS
glutIdleFunc is "continuously called when events are not being received". The update speed depends heavily on the system on which you are running, and will vary over the lifetime of the program, since it will slow down or even stop being called as events are being received.
In a typical windowed application, though, this gets called regularly enough to provide reasonable behavior. However, if you want a constant speed for rotation/translation, you'll need to implement your own timing to handle keeping the speed constant.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow