Freshman, the glutTimerFunc is a little confusing

you need to call glutTimerFunc again in its corresponding implementation, which makes it something like a recursion?
but I think it is impossible because recursions spend stack space, long term timer surely causes stack overflow

No need to worry, it is really not a recursion.
Just a sequence of scheduling something to be executed once each time.
Read the freeglut source code if you still can’t sleep at night.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.