aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/javax/media/opengl/Threading.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/javax/media/opengl/Threading.java')
-rwxr-xr-xsrc/classes/javax/media/opengl/Threading.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/classes/javax/media/opengl/Threading.java b/src/classes/javax/media/opengl/Threading.java
index 7aa57def5..f8d54d95d 100755
--- a/src/classes/javax/media/opengl/Threading.java
+++ b/src/classes/javax/media/opengl/Threading.java
@@ -197,7 +197,17 @@ public class Threading {
return EventQueue.isDispatchThread();
}
case WORKER:
- return GLWorkerThread.isWorkerThread();
+ if (Java2D.isOGLPipelineActive()) {
+ // FIXME: ideally only the QFT would be considered to be the
+ // "OpenGL thread", but we can not currently run all of JOGL's
+ // OpenGL work on that thread. For now, run the GLJPanel's
+ // Java2D/JOGL bridge on the QFT but everything else on the
+ // worker thread, except when we're already on the QFT.
+ return (Java2D.isQueueFlusherThread() ||
+ GLWorkerThread.isWorkerThread());
+ } else {
+ return GLWorkerThread.isWorkerThread();
+ }
default:
throw new InternalError("Illegal single-threading mode " + mode);
}