JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.GLAnimatorControl Interface Reference

An animator control interface, which implementation may drive a com.jogamp.opengl.GLAutoDrawable animation. More...

Inheritance diagram for com.jogamp.opengl.GLAnimatorControl:
Collaboration diagram for com.jogamp.opengl.GLAnimatorControl:

Classes

interface  UncaughtExceptionHandler
 A registered UncaughtExceptionHandler instance is invoked when an animator abruptly stops due to an uncaught exception from one of its GLAutoDrawables. More...
 

Public Member Functions

boolean isStarted ()
 Indicates whether this animator has been started. More...
 
boolean isAnimating ()
 Indicates whether this animator is started and is not paused. More...
 
boolean isPaused ()
 Indicates whether this animator is started and either manually paused or paused automatically due to no added GLAutoDrawables. More...
 
Thread getThread ()
 
boolean start ()
 Starts this animator, if not running. More...
 
boolean stop ()
 Stops this animator. More...
 
boolean pause ()
 Pauses this animator. More...
 
boolean resume ()
 Resumes animation if paused. More...
 
void add (GLAutoDrawable drawable)
 Adds a drawable to this animator's list of rendering drawables. More...
 
void remove (GLAutoDrawable drawable)
 Removes a drawable from the animator's list of rendering drawables. More...
 
UncaughtExceptionHandler getUncaughtExceptionHandler ()
 Returns the UncaughtExceptionHandler invoked when this animator abruptly stops due to an uncaught exception from one of its GLAutoDrawables. More...
 
void setUncaughtExceptionHandler (final UncaughtExceptionHandler handler)
 Set the handler invoked when this animator abruptly stops due to an uncaught exception from one of its GLAutoDrawables. More...
 
- Public Member Functions inherited from com.jogamp.opengl.FPSCounter
void setUpdateFPSFrames (int frames, PrintStream out)
 
void resetFPSCounter ()
 Reset all performance counter (startTime, currentTime, frame number) More...
 
int getUpdateFPSFrames ()
 
long getFPSStartTime ()
 Returns the time of the first display call in milliseconds after enabling this feature via setUpdateFPSFrames(int, PrintStream). More...
 
long getLastFPSUpdateTime ()
 Returns the time of the last update interval in milliseconds, if this feature is enabled via setUpdateFPSFrames(int, PrintStream). More...
 
long getLastFPSPeriod ()
 
float getLastFPS ()
 
int getTotalFPSFrames ()
 
long getTotalFPSDuration ()
 
float getTotalFPS ()
 

Additional Inherited Members

- Static Public Attributes inherited from com.jogamp.opengl.FPSCounter
static final int DEFAULT_FRAMES_PER_INTERVAL = 5*60
 

Detailed Description

An animator control interface, which implementation may drive a com.jogamp.opengl.GLAutoDrawable animation.

Definition at line 35 of file GLAnimatorControl.java.

Member Function Documentation

◆ add()

void com.jogamp.opengl.GLAnimatorControl.add ( GLAutoDrawable  drawable)

Adds a drawable to this animator's list of rendering drawables.

This allows the animator thread to become animating, in case the first drawable is added and the animator is started.

Parameters
drawablethe drawable to be added
Exceptions
IllegalArgumentExceptionif drawable was already added to this animator

Implemented in com.jogamp.opengl.util.AnimatorBase.

Here is the caller graph for this function:

◆ getThread()

Thread com.jogamp.opengl.GLAnimatorControl.getThread ( )
Returns
The animation thread if running, otherwise null.
See also
start()
stop()

Implemented in com.jogamp.opengl.util.AnimatorBase.

Here is the caller graph for this function:

◆ getUncaughtExceptionHandler()

UncaughtExceptionHandler com.jogamp.opengl.GLAnimatorControl.getUncaughtExceptionHandler ( )

Returns the UncaughtExceptionHandler invoked when this animator abruptly stops due to an uncaught exception from one of its GLAutoDrawables.

Default is null.

Since
2.2

Implemented in com.jogamp.opengl.util.AnimatorBase.

◆ isAnimating()

boolean com.jogamp.opengl.GLAnimatorControl.isAnimating ( )

Indicates whether this animator is started and is not paused.

See also
start()
stop()
pause()
resume()

Implemented in com.jogamp.opengl.util.Animator, com.jogamp.opengl.util.FPSAnimator, and com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT.MiniPApplet.CustomAnimator.

Here is the caller graph for this function:

◆ isPaused()

boolean com.jogamp.opengl.GLAnimatorControl.isPaused ( )

Indicates whether this animator is started and either manually paused or paused automatically due to no added GLAutoDrawables.

See also
start()
stop()
pause()
resume()

Implemented in com.jogamp.opengl.util.Animator, com.jogamp.opengl.util.FPSAnimator, and com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT.MiniPApplet.CustomAnimator.

Here is the caller graph for this function:

◆ isStarted()

boolean com.jogamp.opengl.GLAnimatorControl.isStarted ( )

Indicates whether this animator has been started.

See also
start()
stop()
isPaused()
pause()
resume()

Implemented in com.jogamp.opengl.util.AnimatorBase, and com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT.MiniPApplet.CustomAnimator.

Here is the caller graph for this function:

◆ pause()

boolean com.jogamp.opengl.GLAnimatorControl.pause ( )

Pauses this animator.

In most situations this method blocks until completion, except when called from the animation thread itself or in some cases from an implementation-internal thread like the AWT event queue thread.

Returns
false if not started, already paused or failed to pause, otherwise true
See also
resume()
isAnimating()

Implemented in com.jogamp.opengl.util.Animator, com.jogamp.opengl.util.FPSAnimator, and com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT.MiniPApplet.CustomAnimator.

Here is the caller graph for this function:

◆ remove()

void com.jogamp.opengl.GLAnimatorControl.remove ( GLAutoDrawable  drawable)

Removes a drawable from the animator's list of rendering drawables.

This method should get called in case a drawable becomes invalid, and will not be recovered.

This allows the animator thread to become not animating, in case the last drawable has been removed.

Parameters
drawablethe drawable to be removed
Exceptions
IllegalArgumentExceptionif drawable was not added to this animator

Implemented in com.jogamp.opengl.util.AnimatorBase.

Here is the caller graph for this function:

◆ resume()

boolean com.jogamp.opengl.GLAnimatorControl.resume ( )

Resumes animation if paused.

In most situations this method blocks until completion, except when called from the animation thread itself or in some cases from an implementation-internal thread like the AWT event queue thread.

If resumed, all counters (time, frames, ..) are reset to zero.

Returns
false if not started, not paused or unable to resume, otherwise true
See also
pause()
isAnimating()

Implemented in com.jogamp.opengl.util.Animator, com.jogamp.opengl.util.FPSAnimator, and com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT.MiniPApplet.CustomAnimator.

Here is the caller graph for this function:

◆ setUncaughtExceptionHandler()

void com.jogamp.opengl.GLAnimatorControl.setUncaughtExceptionHandler ( final UncaughtExceptionHandler  handler)

Set the handler invoked when this animator abruptly stops due to an uncaught exception from one of its GLAutoDrawables.

Parameters
handlerthe UncaughtExceptionHandler to use as this animator's uncaught exception handler. Pass null to unset the handler.
See also
UncaughtExceptionHandler::uncaughtException(GLAnimatorControl, GLAutoDrawable, Throwable)
Since
2.2

Implemented in com.jogamp.opengl.util.AnimatorBase.

◆ start()

boolean com.jogamp.opengl.GLAnimatorControl.start ( )

Starts this animator, if not running.

In most situations this method blocks until completion, except when called from the animation thread itself or in some cases from an implementation-internal thread like the AWT event queue thread.

Note that an animator w/o added drawables will be paused automatically.

If started, all counters (time, frames, ..) are reset to zero.

Returns
true is started due to this call, otherwise false, ie started already or unable to start.
See also
stop()
isAnimating()
isPaused()
getThread()

Implemented in com.jogamp.opengl.util.Animator, com.jogamp.opengl.util.FPSAnimator, and com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT.MiniPApplet.CustomAnimator.

Here is the caller graph for this function:

◆ stop()

boolean com.jogamp.opengl.GLAnimatorControl.stop ( )

Stops this animator.

In most situations this method blocks until completion, except when called from the animation thread itself or in some cases from an implementation-internal thread like the AWT event queue thread.

Returns
true is stopped due to this call, otherwise false, ie not started or unable to stop.
See also
start()
isAnimating()
getThread()

Implemented in com.jogamp.opengl.util.Animator, com.jogamp.opengl.util.FPSAnimator, and com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT.MiniPApplet.CustomAnimator.

Here is the caller graph for this function:

The documentation for this interface was generated from the following file: