net.java.games.jogl
Class Animator

java.lang.Object
  extended bynet.java.games.jogl.Animator

public class Animator
extends Object

An Animator can be attached to a GLDrawable to drive its display() method in a loop. For efficiency, it sets up the rendering thread for the drawable to be its own internal thread, so it can not be combined with manual repaints of the surface.

The Animator currently contains a workaround for a bug in NVidia's drivers (80174). The current semantics are that once an Animator is created with a given GLDrawable as a target, repaints will likely be suspended for that GLDrawable until the Animator is started. This prevents multithreaded access to the context (which can be problematic) when the application's intent is for single-threaded access within the Animator. It is not guaranteed that repaints will be prevented during this time and applications should not rely on this behavior for correctness.


Constructor Summary
Animator(GLDrawable drawable)
          Creates a new Animator for a particular drawable.
 
Method Summary
 void start()
          Starts this animator.
 void stop()
          Stops this animator, blocking until the animation thread has finished.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Animator

public Animator(GLDrawable drawable)
Creates a new Animator for a particular drawable.

Method Detail

start

public void start()
Starts this animator.


stop

public void stop()
Stops this animator, blocking until the animation thread has finished.