aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLContext.java6
-rw-r--r--src/jogl/classes/javax/media/opengl/GLDrawableFactory.java11
2 files changed, 13 insertions, 4 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index 63a02ad9c..a2ce619e7 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -1141,7 +1141,7 @@ public abstract class GLContext {
}
/**
- * Returns the GLProfile's major version number and it's context property (CTP) for availability mapping request.
+ * Returns the GLProfile's major version number at reqMajorCTP[0] and it's context property (CTP) at reqMajorCTP[1] for availability mapping request.
*/
protected static final void getRequestMajorAndCompat(final GLProfile glp, int[/*2*/] reqMajorCTP) {
final GLProfile glpImpl = glp.getImpl();
@@ -1149,7 +1149,9 @@ public abstract class GLContext {
reqMajorCTP[0]=4;
} else if (glpImpl.isGL3()) {
reqMajorCTP[0]=3;
- } else /* if (glpImpl.isGL2()) */ {
+ } else if (glpImpl.isGLES1()) {
+ reqMajorCTP[0]=1;
+ } else /* if (glpImpl.isGL2() || glpImpl.isGLES2()) */ {
reqMajorCTP[0]=2;
}
if( glpImpl.isGLES() ) {
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() {};