PDA

View Full Version : OpenGL \ GLUT & FC2



PompeyBlue
16th August 2004, 08:48 AM
Hello,

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 ?

micha
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).

PompeyBlue
17th August 2004, 10:43 AM
Hi,

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 ?

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

glutPostRedisplay();

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