Login  Register

Re: VSync logic : UPS / FPS

Posted by Demoscene Passivist on Aug 16, 2010; 1:11pm
URL: https://forum.jogamp.org/VSync-logic-UPS-FPS-tp1134125p1170343.html

>Today, with a simple Animator and with VSync activated, I get 60fps
>on a 60Hz screen (wahoo !), but the 'display' event is called about 100
>times per second on my renderer. It's just a waste  of ressources I
>would like to avoid.

With "my renderer" u mean the GLEventListener ur animator calls ? If so ur display method on the GLEventListener method is only called 60 times per second when VSync is on (assuming the default 60hz LCD refresh) and ur Animator is set to "RunAsFastAsPossible". When u get 100 display calls per second theres something wrong with ur code.

Maybe u could provide some code snippets to clear things up ?

Also take a look at the JOGL demos e.g. "Gears" http://github.com/sgothel/jogl-demos/blob/master/src/demos/gears/Gears.java and try the simple demo on ur machine. I'm sure u will immediatly see that the display method is only called in sync with ur display refresh (60hz). If Gears has the correct display method call count and ur code does not u know that theres stg wrong with ur code.