PDA

View Full Version : GlutTimerFunc



Pedrosanchez87
03-13-2017, 11:21 AM
Is there a specific time that the glutTimerFunc() needs to be called in the main function. I always assumed just before the glutMainLoop() unless there is something else that has to be there.

Dark Photon
03-13-2017, 04:52 PM
There's nothing in the docs (https://www.opengl.org/resources/libraries/glut/spec3/node64.html) about needing to call it before glutMainLoop(), and I'm pretty sure I've used it successfully (years ago) by calling it inside of some of the GLUT callbacks like display, keyboard, mouse, and even in a timer function callback.