aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-19 07:48:07 +0200
committerSven Gothel <[email protected]>2012-10-19 07:48:07 +0200
commit48bcceaf611a17bb3795aa9fe25a0e0c726879f7 (patch)
tree3e1ff6fc87d770ac554683de3a9760259ccf237e /src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
parent416c7fc1b90cd7b34c251268bb83ebeea61d17d6 (diff)
EGLDrawableFactory: Detect ES1 implementation within ES2 library, if not found in ES1 library
This is the case in BCM-VC-IV blobs, tested on Raspeberry-Pi
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
index e985e63b2..dbe7ffa16 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -99,6 +99,13 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
}
}
+ private static final boolean includesES1(GLDynamicLookupHelper dl) {
+ return 0 != dl.dynamicLookupFunction("glLoadIdentity") &&
+ 0 != dl.dynamicLookupFunction("glEnableClientState") &&
+ 0 != dl.dynamicLookupFunction("glBegin") &&
+ 0 != dl.dynamicLookupFunction("glColorPointer");
+ }
+
public EGLDrawableFactory() {
super();
@@ -138,7 +145,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
System.err.println("Info: EGLDrawableFactory: EGL ES1 - OK, isANGLE: "+isANGLEES1);
}
} else if (DEBUG || GLProfile.DEBUG) {
- System.err.println("Info: EGLDrawableFactory: EGL ES1 - NOPE");
+ System.err.println("Info: EGLDrawableFactory: EGL ES1 - NOPE (ES1 lib)");
}
}
if(!hasDesktopES2 && null==eglES2DynamicLookupHelper) {
@@ -153,10 +160,17 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
if(null!=tmp && tmp.isLibComplete()) {
eglES2DynamicLookupHelper = tmp;
EGL.resetProcAddressTable(eglES2DynamicLookupHelper);
+ final boolean includesES1 = null == eglES1DynamicLookupHelper && includesES1(eglES2DynamicLookupHelper);
+ if(includesES1) {
+ eglES1DynamicLookupHelper = tmp;
+ }
final boolean isANGLEES2 = isANGLE(eglES2DynamicLookupHelper);
isANGLE |= isANGLEES2;
if (DEBUG || GLProfile.DEBUG) {
- System.err.println("Info: EGLDrawableFactory: EGL ES2 - OK, isANGLE: "+isANGLEES2);
+ System.err.println("Info: EGLDrawableFactory: EGL ES2 - OK (includesES1 "+includesES1+", isANGLE: "+isANGLEES2+")");
+ if(includesES1) {
+ System.err.println("Info: EGLDrawableFactory: EGL ES1 - OK (ES2 lib)");
+ }
}
} else if (DEBUG || GLProfile.DEBUG) {
System.err.println("Info: EGLDrawableFactory: EGL ES2 - NOPE");