diff options
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLDrawableFactory.java')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLDrawableFactory.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java index fbdc51022..acda45bff 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java @@ -158,7 +158,9 @@ public abstract class GLDrawableFactory { } } } - nativeOSFactory = tmp; + if(null != tmp && tmp.isComplete()) { + nativeOSFactory = tmp; + } tmp = null; try { @@ -169,7 +171,9 @@ public abstract class GLDrawableFactory { jre.printStackTrace(); } } - eglFactory = tmp; + if(null != tmp && tmp.isComplete()) { + eglFactory = tmp; + } } protected static void shutdown(ShutdownType shutdownType) { @@ -233,6 +237,9 @@ public abstract class GLDrawableFactory { glDrawableFactories.add(this); } } + + /** Returns true if this factory is complete, i.e. ready to be used. Otherwise return false. */ + protected abstract boolean isComplete(); protected void enterThreadCriticalZone() {}; protected void leaveThreadCriticalZone() {}; |