diff options
author | Sven Gothel <[email protected]> | 2013-10-19 07:11:01 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-19 07:11:01 +0200 |
commit | 51bb8b2259e8eae9f62ec7202e8b7eb934a44c85 (patch) | |
tree | c3bb944e229fdc33a328ff3f6c8e7596dc6f8830 | |
parent | 6be41a8e457ec2881f4ce351395ba84748a737b6 (diff) |
CLDynamicLibraryBundleInfo: Add libPVROCL.so lookup if Android ..v2.1.1
-rw-r--r-- | resources/android/AndroidManifest-jocl.xml | 3 | ||||
-rw-r--r-- | src/com/jogamp/opencl/llb/impl/CLDynamicLibraryBundleInfo.java | 14 |
2 files changed, 13 insertions, 4 deletions
diff --git a/resources/android/AndroidManifest-jocl.xml b/resources/android/AndroidManifest-jocl.xml index e02ee3d..07fff31 100644 --- a/resources/android/AndroidManifest-jocl.xml +++ b/resources/android/AndroidManifest-jocl.xml @@ -3,10 +3,11 @@ sharedUserId="com.jogamp.Community" package="com.jogamp.opencl"> - <uses-sdk android:minSdkVersion="9" /> <uses-library android:name="com.jogamp.common" android:required="true" /> <uses-library android:name="javax.media.opengl" android:required="true" /> + <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/> + <application android:icon="@drawable/icon" android:label="@string/app_name" android:description="@string/app_descr" diff --git a/src/com/jogamp/opencl/llb/impl/CLDynamicLibraryBundleInfo.java b/src/com/jogamp/opencl/llb/impl/CLDynamicLibraryBundleInfo.java index ff5a122..36bc26f 100644 --- a/src/com/jogamp/opencl/llb/impl/CLDynamicLibraryBundleInfo.java +++ b/src/com/jogamp/opencl/llb/impl/CLDynamicLibraryBundleInfo.java @@ -40,7 +40,9 @@ import java.security.PrivilegedAction; import java.util.*; public final class CLDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { + private static final boolean isAndroid; private static final List<String> glueLibNames; + static { AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { @@ -53,6 +55,7 @@ public final class CLDynamicLibraryBundleInfo implements DynamicLibraryBundleInf return null; } }); + isAndroid = Platform.OSType.ANDROID == Platform.OS_TYPE; glueLibNames = new ArrayList<String>(); glueLibNames.add("jocl"); @@ -77,7 +80,7 @@ public final class CLDynamicLibraryBundleInfo implements DynamicLibraryBundleInf */ @Override public final boolean shallLookupGlobal() { - if ( Platform.OSType.ANDROID == Platform.OS_TYPE ) { + if ( isAndroid ) { // Android requires global symbol lookup return true; } @@ -100,8 +103,13 @@ public final class CLDynamicLibraryBundleInfo implements DynamicLibraryBundleInf libCL.add("libOpenCL.so.1"); // unix libCL.add("OpenCL"); // windows, OSX - // try this one as well, if spec fails - libCL.add("libGL.so.1"); + if( isAndroid ) { + libCL.add("libPVROCL.so"); + libCL.add("/system/vendor/lib/libPVROCL.so"); + } else { + // try this one as well, if spec fails + libCL.add("libGL.so.1"); + } // ES2: This is the default lib name, according to the spec libCL.add("libGLESv2.so.2"); |