diff options
author | Sven Gothel <[email protected]> | 2011-08-06 10:07:05 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-08-06 10:07:05 +0200 |
commit | 8c1007f28396956d5ef83fbbbea78e910c1e53bd (patch) | |
tree | 1ad27a2c5bd61c3872565a316e557a2b8e0b1760 /src/jogl/classes/jogamp/opengl/egl | |
parent | d63ca3ad5d2acf20a8ff8f27778ef084b305260c (diff) |
EGL/Android: Favor driver's EGL/ES native library - Using Android's fails
FIXME: find proper solution, instead of using hardcoded and non-std lib names
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl')
3 files changed, 26 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java index 1d2d20f61..ff838dd0b 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java @@ -30,6 +30,8 @@ package jogamp.opengl.egl; import com.jogamp.common.os.DynamicLookupHelper; import com.jogamp.common.os.NativeLibrary; +import com.jogamp.common.os.Platform; + import java.util.*; import javax.media.nativewindow.*; @@ -71,8 +73,14 @@ public abstract class EGLDynamicLibraryBundleInfo extends GLDynamicLibraryBundle protected List/*<String>*/ getEGLLibNamesList() { List/*<String>*/ eglLibNames = new ArrayList(); + if(Platform.getOSType() == Platform.OSType.ANDROID) { + // using the android-EGL fails + eglLibNames.add("/system/lib/egl/libEGL_POWERVR_SGX530_125.so"); + } + // try default generic names first eglLibNames.add("EGL"); + // for windows distributions using the 'unlike' lib prefix, // where our tool does not add it. eglLibNames.add("libEGL"); diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java index 87d7d992f..8d59899f2 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java @@ -29,6 +29,9 @@ package jogamp.opengl.egl; import java.util.*; + +import com.jogamp.common.os.Platform; + import jogamp.opengl.*; public class EGLES1DynamicLibraryBundleInfo extends EGLDynamicLibraryBundleInfo { @@ -40,6 +43,12 @@ public class EGLES1DynamicLibraryBundleInfo extends EGLDynamicLibraryBundleInfo List/*<List>*/ libNames = new ArrayList(); List/*<String>*/ glesLibNames = new ArrayList(); + + if(Platform.getOSType() == Platform.OSType.ANDROID) { + // using the android-EGL fails + glesLibNames.add("/system/lib/egl/libGLESv1_CM_POWERVR_SGX530_125.so"); + } + // try default generic names first glesLibNames.add("GLES_CM"); glesLibNames.add("GLES_CL"); diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java index ec21b3992..175c97854 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java @@ -29,6 +29,9 @@ package jogamp.opengl.egl; import java.util.*; + +import com.jogamp.common.os.Platform; + import jogamp.opengl.*; public class EGLES2DynamicLibraryBundleInfo extends EGLDynamicLibraryBundleInfo { @@ -40,6 +43,12 @@ public class EGLES2DynamicLibraryBundleInfo extends EGLDynamicLibraryBundleInfo List/*<List>*/ libNames = new ArrayList(); List/*<String>*/ glesLibNames = new ArrayList(); + + if(Platform.getOSType() == Platform.OSType.ANDROID) { + // using the android-EGL fails + glesLibNames.add("/system/lib/egl/libGLESv2_POWERVR_SGX530_125.so"); + } + // try default generic names first glesLibNames.add("GLES20"); glesLibNames.add("GLESv2"); |