What I was thinking about for several times in the past was how to accurately time an OpenGL Application.
The idea behind my thaught is to make the Application run at the same speed and smoothness on every system that has enough CPU power to do so.
When I try out my Apps on my friends system for example they run at quite a different speed (a lot faster in this particualr case) than on my pc.
My Question is: What is the best way to do what I want to?
I went through many of the available Tutorials (like one of nates excelent tutorials, nehe’s superb ones etc.)
Some of my own Ideas:
[SAVE HARDWARE TIMER TICKS]
[WAIT UNTIL A SPECIAL COUNT OF TICKS HAVE OCCURED]
The problem of this one is that the Framerate is limited to a particular value.
The second Idea I had but was not able to implement so far is this one:
Pack all the Object movement in one particular function. Call this function in exact periods of time (lets say 100 ms)
and then Interpolate the movement of the objects in the period between the position changes.
Please tell me what you think about it. Maybe you already implemented it by yourself and can explain your approach.
I’m looking forward to your comments.