FPSAnimator Vs. Animator

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

FPSAnimator Vs. Animator

Pixelapp
I would like to implement and object that maintains my frame in JOGL. Julien kindly said that Animator is more compatible than FPSAnimator. However can't control my frames per second with an Animator.

Is that true that FPSAnimator is very incompatible? If so, any suggestion would be appreciated.

Maybe we should work on the FPSAnimator to make it compatible.
Reply | Threaded
Open this post in threaded view
|

Re: FPSAnimator Vs. Animator

gouessej
Administrator
Hi

Some people complained that FPSAnimator does not behave exactly the same under Windows and Linux. Why not using the vertical synchronisation? It's very simple, just use setSwapInterval(). The only drawback is that the end user can still prevent this setting from being respected. In my humble opinion, a game should not explicitly rely on a constant frame rate, it is a wrong way of handling the timing, really.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: FPSAnimator Vs. Animator

elect
What's the difference between the two?
Reply | Threaded
Open this post in threaded view
|

Re: FPSAnimator Vs. Animator

Sven Gothel
Administrator
On 03/20/2015 02:12 PM, elect [via jogamp] wrote:
> What's the difference between the two?
>

Our IIRC chat about v-sync and animator ..
<http://jogamp.org/log/irc/jogamp_20141026050625.html#l69>

In short: FPSAnimator relies on manual sync,
simply using a timer.

Animator relies on the v-sync 'GLBase.setSwapInterval(int)'
and simply renders as fast as possible (w/ a thread yield if desired).
Hence Animator is the only reliable tear-free working animator.

Further in above discussion, the v-sync when using more than one window,
which may result in a double v-sync (halved framerate ..)

~Sven



signature.asc (828 bytes) Download Attachment