How To Do Timer in opengl?

Started by
3 comments, last by mrrolf810p 19 years, 5 months ago
How to do the timer stuff? Is it better to use Frame per second or ?
Advertisement
If you are using glut you can use glutGet(GLUT_ELAPSED_TIME).
-----------------------------Download my real time 3D RPG.
Timers have nothing to do with OpenGL (disregarding GLUT, which I know very little about). Look into QueryPerformanceCounter() and QueryPerformanceFrequency() in the Win32 API.
How if I use timer.h?
is it easier ?
time.h
easier? it might be a couple lines shorter.
as accurate? QueryPerformanceCounter() is much better.

Go with QueryPerformanceCounter(). You get a better timer for almost no extra work.

This topic is closed to new replies.

Advertisement