summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-02-13 07:00:01 +0100
committerSven Gothel <[email protected]>2012-02-13 07:00:01 +0100
commit4011e70eed8c88aee0fcd051a50ab3f15bb94f68 (patch)
treee7fb1c33d4c0e75fc52dc3ec2d927f76c51de216 /src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java
parentddd375375025fb83aba90c80b9a089876dad5434 (diff)
OpenGL ES/EGL Overhaul
- GLProfile properly detects native EGL/ES1/ES2 on the 'desktop' device factory. This allows usage of Mesa's EGL/ES or Imageon's PVR emulation, etc. - GLProfile drops getDefaultDesktopDevice() and getDefaultEGLDevice() since both are aligned by getDefaultDevice(). - Fix GL_ARB_ES2_compatibility detection and utilize resulting isGLES2Compatible() where possible. This allows ES2 compatible desktop profiles to use core ES2 functionality (glShaderBinary() .. etc) even with a GL2ES2 desktop implementation. - EGLDrawable: If createSurface(..) fails (BAD_NATIVE_WINDOW) w/ surfaceHandle it uses windowHandle if available and differs. This allows the ANGLE impl. to work. - Properly order of EGL/ES library lookup: ES2: libGLESv2.so.2, libGLESv2.so, GLES20, GLESv2_CM EGL: libEGL.so.1, libEGL.so, EGL - *DynamicLookupHelper reference will be null if it's library is not complete (all tool libs, all glue libs and a ProcAddressFunc lookup function - if named). - Enhance GL version string (incl. ES2 compatible, hw/sw, ..) - GLBase: Fix docs and remove redundancies - Prepared (disabled) DesktopES2DynamicLibraryBundleInfo to be used for a real EGL/ES2 implementation within the desktop GL lib (AMD). Sadly it currenly crashed within eglGetDisplay(EGL_DEFAULT_DISPLAY), hence it's disabled.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java
index 50c4950a0..841d50f5f 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java
@@ -51,7 +51,14 @@ public abstract class EGLDynamicLibraryBundleInfo extends GLDynamicLibraryBundle
super();
}
- /** Might be a desktop GL library, and might need to allow symbol access to subsequent libs */
+ /**
+ * Might be a desktop GL library, and might need to allow symbol access to subsequent libs.
+ *
+ * This respects old DRI requirements:<br>
+ * <pre>
+ * http://dri.sourceforge.net/doc/DRIuserguide.html
+ * </pre>
+ */
public boolean shallLinkGlobal() { return true; }
public boolean shallLookupGlobal() {
@@ -74,19 +81,27 @@ public abstract class EGLDynamicLibraryBundleInfo extends GLDynamicLibraryBundle
}
public final boolean useToolGetProcAdressFirst(String funcName) {
- return false; // JAU / FIXME funcName.startsWith("egl");
+ if ( AndroidVersion.isAvailable ) {
+ // Android requires global dlsym lookup
+ return false;
+ } else {
+ return true;
+ }
}
protected List<String> getEGLLibNamesList() {
List<String> eglLibNames = new ArrayList<String>();
- // try default generic names first
- eglLibNames.add("EGL");
+ // this is the default EGL lib name, according to the spec
+ eglLibNames.add("libEGL.so.1");
+
+ // try these as well, if spec fails
+ eglLibNames.add("libEGL.so");
+ eglLibNames.add("EGL");
+
// for windows distributions using the 'unlike' lib prefix,
// where our tool does not add it.
eglLibNames.add("libEGL");
- // this is the default EGL lib name, according to the spec
- eglLibNames.add("libEGL.so.1");
return eglLibNames;
}