JOGL/SWT performance question

I’ve got a performance question - when my application is visible on screen, its performance is reasonable at 10-15% CPU utilization running at approximately 80fps (mind you, this is a p3-600), but when the application is minimized, CPU utilization peaks out and brings the system to a halt. I’m pretty sure that its because the animator is still executing my display() loop but because its not drawing anything to screen, its executing much faster. Is there any prefered way to avoid this problem, other than with sleeps or other ugly slowdowns to restrict the animator to running the display() function less often (in case the application is hidden or minimized)? Is there any other class that can be used in place of the Animator that would remedy the problem?

I’m relatively new to JOGL and haven’t had much luck with finding an architecturally sound way to get around this problem. Its very likely that there is some rendering option that I’m missing or failing to set, and if so, I apologize in advance.

Regards,

Chris

You should feel free to write your own Animator or otherwise restructure your display loop to fit your application. For example, if your application only needs to respond to user input, you don’t need an Animator at all, but can simply use repaint() to cause your GLCanvas to be updated. The HWShadowmapsSimple and InfiniteShadowVolumes jogl-demos use this technique. If you need to run at full speed while visible, you could add a WindowListener to your containing Frame and stop and restart the Animator upon minimize and unminimize events, respectively.