Jump to content
  • Advertisement
Sign in to follow this  
Kromagnon

Game Timer Question!!!

This topic is 2906 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, so I'm a bit of a novice and I'm working with OpenGL (freeglut). I created a Hi-Res Timer using 'QueryPerformanceFrequency' for my game so movement and stuff isn't erratic.

I was just wondering if there was a great deal of difference between using 'QueryPerformanceFrequency' or 'GLUT_ELAPSED_TIME' to create my timer.
Is GLUT_ELAPSED_TIME hi-res? Using OpenGL, is it best to stick to glut functions?

Share this post


Link to post
Share on other sites
Advertisement
First: I don't know how GLUT_ELAPSED_TIME is implemented. If I had to guess, since it's the number of milliseconds since glutInit was called, I'd say it uses something like timeGetTime() - much lower resolution than QPF.
Quote:
is it best to stick to glut functions?

In general, you shouldn't have any problems using functions other than gl, glu and glut for anything other than graphics related manipulations.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!