|
j3d.org OpenGL SWT Bindings | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.opengl.swt.Threading
This API provides access to the threading model for the implementation of JOGL on SWT.
This class is a re-implementation of the AWT-specific
javax.media.opengl.Threading
class that specifically targets the
needs of SWT. The core package class uses a lot of AWT-specific code
internally, which can cause rendering deadlocks, particularly on Mac OSX.
Please use this class instead of the core class if you need this level of
functionality. The functionality is the same, so the documentation there is
applicable to this class.
Method Summary | |
static void |
disableSingleThreading()
If an implementation of the javax.media.opengl APIs offers a multithreading option but the default behavior is single-threading, this API provides a mechanism for end users to disable single-threading in this implementation. |
static void |
invokeOnOpenGLThread(java.lang.Runnable r)
Executes the passed Runnable on the single thread used for all OpenGL work in this javax.media.opengl API implementation. |
static boolean |
isOpenGLThread()
Indicates whether the current thread is the single thread on which this implementation of the javax.media.opengl APIs performs all of its OpenGL-related work. |
static boolean |
isSingleThreaded()
Indicates whether OpenGL work is being automatically forced to a single thread in this implementation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void disableSingleThreading()
Users are strongly discouraged from calling this method unless they are aware of all of the consequences and are prepared to enforce some amount of threading restrictions in their applications.
Currently there is no supported way to re-enable it once disabled, partly to discourage careless use of this method. This method should be called as early as possible in an application.
public static boolean isSingleThreaded()
public static boolean isOpenGLThread() throws GLException
GLException
public static void invokeOnOpenGLThread(java.lang.Runnable r) throws GLException
isOpenGLThread()
returns
false). It is up to the end user to check to see whether the current
thread is the OpenGL thread and either execute the Runnable directly or
perform the work inside it.
GLException
|
j3d.org OpenGL SWT Bindings | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |