I was wondering how I could limit the computer from constantly rendering my scene in JOGL when the scene is either not visible because it is in another tab of a JTabbedPane or the window is minimized, etc? Or even if the window is visible but nothing is changing in it, is there a way to prevent unnecessary repaints?
In particular, is there a way to pause the animator or temporarily disable the draw loop? Is there some setting that would allow me to run my display without taxing the resources unnecessarily?
I have the following in my code regarding the canvas that I use (using GLJPanel()) … are one of these settings incorrect? Sorry to sound like a horrible newbie, but I tried searching the forum with little luck:
...
...
canvas.setIgnoreRepaint( true ); // canvas is a GLJPanel()
animator = new FPSAnimator( canvas, 60, true );
animator.setRunAsFastAsPossible(false);
...
...