Reply – Re: Crash with Animator class
Your Name
Subject
Message
or Cancel
In Reply To
Re: Crash with Animator class
— by Xerxes Rånby Xerxes Rånby
to summarise: the monitor refresh rate is what limits you how many real frames per second you can display

We recommend using the Animator class and using gl.setSwapInterval(1) to render one frame for each monitor update.

The JogAmp API MonitorMode api allow you to switch to a monitor mode with the desired refreshrate you want. Example on how to use MonitorMode is found in the javadoc and in the jogl junit tests:
https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/newt/MonitorMode.html

When working with high FPS having a good high resolution timer is essential for smooth animations:
// use JogAmp high resolution timer for smooth animations!
com.jogamp.common.os.Platform.currentTimeMicros();

example: on my linux system i can list what refresh rates my monitor support using xrandr or the JogAmp MonitorMode API. If i Switch to 1280x1024 then my monitor is actually able to run at 75.02 real FPS and by using the Animator class i can render one frame each monitor update! If i use 1920x108 i can only get 60 real FPS.

If I buy a better monitor then I can use  240Hz modes that will give me more real FPS.
update: there are some extreme monitors able to do 480Hz and 960Hz... crazy times :)

   1920x1080     60.00*+  59.99    59.94    50.00    60.05    60.00    50.04  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      59.89  
   1366x768      59.79  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94    59.93