com.sun.opengl.impl
Class GLWorkerThread
public class GLWorkerThread
Singleton thread upon which all OpenGL work is performed by
default. Unfortunately many vendors' OpenGL drivers are not really
thread-safe and stability is much improved by performing OpenGL
work on at most one thread. This is the default behavior of the
GLAutoDrawable implementations according to the
Threading
class. The GLWorkerThread
replaces the original AWT event queue thread-based mechanism for
two reasons: first, more than one AWT event queue thread may be
spawned, for example if a dialog is being shown; second, it avoids
blocking the AWT event queue thread during OpenGL rendering.
static void | invokeAndWait(Runnable runnable)
|
static void | invokeLater(Runnable runnable)
|
static boolean | isStarted() - Indicates whether the OpenGL worker thread was started, i.e.,
whether it is currently in use.
|
static boolean | isWorkerThread() - Indicates whether the current thread is the OpenGL worker
thread.
|
static void | start() - Should only be called by Threading class if creation of the
GLWorkerThread was requested via the opengl.1thread system
property.
|
invokeAndWait
public static void invokeAndWait(Runnable runnable)
throws InvocationTargetException,
InterruptedException
invokeLater
public static void invokeLater(Runnable runnable)
isStarted
public static boolean isStarted()
Indicates whether the OpenGL worker thread was started, i.e.,
whether it is currently in use.
isWorkerThread
public static boolean isWorkerThread()
Indicates whether the current thread is the OpenGL worker
thread.
start
public static void start()
Should only be called by Threading class if creation of the
GLWorkerThread was requested via the opengl.1thread system
property.
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.