Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Controlling Framerate

  1. #1
    Intern Contributor
    Join Date
    May 2011
    Location
    Alabama, USA
    Posts
    65

    Controlling Framerate

    Hi everybody. I just finished programming an OpenGL screensaver for Windows and I like the speed it runs at on my computer. But my computer is six years old. I'm concerned it may run a little too fast on newer computers. What's the best way to control the framerate?
    Benjamin Barrett aka vindy
    "Our knowledge is finite, while our ignorance is infinite!"

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    716
    Use a timer and only refresh the screen when the timer fires.

  3. #3
    Senior Member OpenGL Pro BionicBytes's Avatar
    Join Date
    Mar 2009
    Location
    UK, London
    Posts
    1,171
    er... the screen should be refreshed every cycle. It's the animation/movement computations which should be increamented according to the time delta since the last animation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •