Author Topic: Too fast on modern hardware ?  (Read 1996 times)

0 Members and 1 Guest are viewing this topic.

RobbeK

  • Guest
Too fast on modern hardware ?
« on: December 22, 2014, 10:17:39 AM »
No slowing down loops built in --  too fast ?  (only one pc in the house now)

Animation based on the Lorenz dif. equations


best Rob

.

Mike Lobanovsky

  • Guest
Re: Too fast on modern hardware ?
« Reply #1 on: December 22, 2014, 11:29:05 AM »
No, it isn't. It can't be because the scene is rendered only once every 20 milliseconds on any computer according to myTimer's timeOut setting. That's why what you're seeing and what I'm seeing actually runs at one and the same FPS rate. :)

RobbeK

  • Guest
Re: Too fast on modern hardware ?
« Reply #2 on: December 22, 2014, 11:54:21 AM »
Ah, thanks Mike -- it's somewhat confusing for me - is it then correct that problems start when the calculation cycle is (a lot) outside the rendering refresh rate ? (and giving less contineous movement )
For rotations/translations I normally use the FrameRate to calculate the incr decr step of the movement ...

best Rob

Mike Lobanovsky

  • Guest
Re: Too fast on modern hardware ?
« Reply #3 on: December 22, 2014, 12:28:26 PM »
Quote
is it then correct that problems start when the calculation cycle is (a lot) outside the rendering refresh rate ?
Yes, that's correct. But not only that. The Windows timer is a very crude instrument with precision granularity as low as 15~16 milliseconds. Which means that timeOut incrementation of 1 to 16 above ~16 milliseconds will immediately reset it to 32 milliseconds, 32 + 1 to 16 milliseconds, to 48 milliseconds, etc. etc. etc.

The Windows timer should be used only in simplest OpenGL applications with a fixed FPS rate that is a multiple of 16 milliseconds. On the other hand, the timer is a very easy means to minimize CPU load in immediate-mode OpenGL applications.