Jump to content
  • Advertisement
Sign in to follow this  
nickme

glut:frame rate is too fast; is there a way to slow it down?

This topic is 2533 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,
i wrote a glut program on win7 that draw a 3D function. i rotate it around the y-axis but it rendered too fast. as suggested by superBible 5th, i included the stopwatch.h and used the following statements.

static CStopWatch rotTimer;
rotate = rotTimer.GetElapsedSeconds();

is there a delay function such as SDL_delay in SDL that i can set the frame rate per second in freeglut or glut?

thanks.

Share this post


Link to post
Share on other sites
Advertisement
It makes no sense to say that something is "rendered too fast", unless you doing something wrong.
Since you are using GetElapsedSeconds, it seems that your rotation code is based on time instead of framerate, that's the first step.
Does it rotates too much? Just make the rotate variable smaller (eg: multiply it by 0.01f)

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!