View Full Version : OpenGL \ GLUT & FC2

16th August 2004, 08:48 AM

So I've had a look through the demos but still can't work out how to get Glut to call a function at a certain frequency ? Ideally I'd set a timer to 60Hz and get it called at that rate, but I don't mind just timing how long it was since the last update and then calling the update code with that time step.

It seems once you tell glut to update it's main loop, you only get repaint messages etc, no form of update ?

16th August 2004, 02:02 PM
I may have a look at the GLUT idle function glutIdleFunc and the GLUT timer glutGet(GLUT_ELAPSED_TIME).

17th August 2004, 10:43 AM

Thanks for the reply, I've now got this working. However, the display never gest updated (it never requests a glutDisplayFunc function).

How do I tell glut that the display is dirty and a new one is ready ?

17th August 2004, 01:25 PM
No worries, I've found it:


Not sure how I missed it in the depths of the demo source I have.