com.jogamp.opengl.impl.awt
Class AWTThreadingPlugin
java.lang.Object
com.jogamp.opengl.impl.awt.AWTThreadingPlugin
- All Implemented Interfaces:
- ThreadingPlugin
public class AWTThreadingPlugin
- extends Object
- implements ThreadingPlugin
Method Summary |
void |
invokeOnOpenGLThread(Runnable r)
Executes the passed Runnable on the single thread used for all
OpenGL work in this javax.media.opengl API implementation. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AWTThreadingPlugin
public AWTThreadingPlugin()
isOpenGLThread
public boolean isOpenGLThread()
throws GLException
- Description copied from interface:
ThreadingPlugin
- 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. This method should only
be called if the single-thread model is in effect.
- Specified by:
isOpenGLThread
in interface ThreadingPlugin
- Throws:
GLException
invokeOnOpenGLThread
public void invokeOnOpenGLThread(Runnable r)
throws GLException
- Description copied from interface:
ThreadingPlugin
- Executes the passed Runnable on the single thread used for all
OpenGL work in this javax.media.opengl API implementation. It is
not specified exactly which thread is used for this
purpose. This method should only be called if the single-thread
model is in use and if the current thread is not the OpenGL
thread (i.e., if
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.
- Specified by:
invokeOnOpenGLThread
in interface ThreadingPlugin
- Throws:
GLException
Copyright 2010 JogAmp Community.