diff options
Diffstat (limited to 'src/classes/com/sun/opengl/impl/GLDrawableHelper.java')
-rw-r--r-- | src/classes/com/sun/opengl/impl/GLDrawableHelper.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLDrawableHelper.java b/src/classes/com/sun/opengl/impl/GLDrawableHelper.java index 920fac624..2a96e2958 100644 --- a/src/classes/com/sun/opengl/impl/GLDrawableHelper.java +++ b/src/classes/com/sun/opengl/impl/GLDrawableHelper.java @@ -105,8 +105,13 @@ public class GLDrawableHelper { GLContext context, Runnable runnable, Runnable initAction) { + // FIXME: downcast to GLContextImpl undesirable + boolean isOptimizable = ((context instanceof GLContextImpl) && + ((GLContextImpl) context).isOptimizable()); + if (GLWorkerThread.isStarted() && - GLWorkerThread.isWorkerThread()) { + GLWorkerThread.isWorkerThread() && + isOptimizable) { // We're going to allow a context to be left current on the // GLWorkerThread for optimization purposes GLContext lastContext = GLContext.getCurrent(); |