How to use Timers in OpenGL
OpenGL is purely a graphics API and thus has no timer functions available. Depending on the windowing API you are using, there are different ways to set up a timer.
For example, with glut you can enable a timer callback using glutTimerFunc().
For example, with glut you can enable a timer callback using glutTimerFunc().
Quote:Original post by Quicky
I use NeHe basecode...
Then use either WM_TIMER or GetTickCount().
As well, SDL integrates well with OpenGL, and supports this kind of thing.
For more info on it's API, check out the SDL Documentation Wiki. (You'd be interested in Section 9: Timers).
For more info on it's API, check out the SDL Documentation Wiki. (You'd be interested in Section 9: Timers).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement