Re: New to JOGL / NEWT
Posted by
Demoscene Passivist on
Dec 29, 2010; 11:23pm
URL: https://forum.jogamp.org/New-to-JOGL-NEWT-tp2157407p2165184.html
>I then saw somewhere that using FPSAnimator was not recommended
> as it behaves differently on windows / linux and can have drift / innacurate results. Is this true?
I only have experience with the FPSAnimator on Windows XP/Vista/7 and its works ok'isch there. The timing difference/inaccuracy is ~20ms wich is ~1-2 frames if u assume 60 frames per second. So its ok but not perfect.
I would recommend using Animator in conjunction with v-sync to get accurate timings for ur rendering and only use FPSAnimator as a fallback, when v-sync is not available on the platform.
The code snippet I referred to in my previous posting contains code for both methods (vsync+fpsanimator).
>In which case do I simply enforce my own timings using Animator and thread.sleep();
>methods on animator? If so, then what is the point of animator? It just seems to be a
>thread that ticks and calls display ... although I guess it is creating GLEvents? Could I
>not simply not use the Animator and instead write a simpler Thread class with my
>own timings?
I would not recommend using a "custom" thread for ur display() loop as there are some subtle multithreading issues involved when calling methods on a GLAutoDrawable. So better leave the threading stuff to the JOGL helper classes or be 120% sure u know what u do