aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.classpath1
-rw-r--r--.externalToolBuilders/jocl-ant.launch6
-rw-r--r--.gitignore3
-rw-r--r--make/build.xml141
-rw-r--r--make/config/cl-buffer-if.cfg (renamed from make/resources/cl-buffer-if.cfg)0
-rw-r--r--make/config/cl-common.cfg (renamed from make/resources/cl-common.cfg)0
-rw-r--r--make/config/cl-context-if.cfg (renamed from make/resources/cl-context-if.cfg)0
-rw-r--r--make/config/cl-device-if.cfg (renamed from make/resources/cl-device-if.cfg)0
-rw-r--r--make/config/cl-event-if.cfg (renamed from make/resources/cl-event-if.cfg)0
-rw-r--r--make/config/cl-if.cfg (renamed from make/resources/cl-if.cfg)0
-rw-r--r--make/config/cl-image-if.cfg (renamed from make/resources/cl-image-if.cfg)0
-rw-r--r--make/config/cl-impl.cfg (renamed from make/resources/cl-impl.cfg)0
-rw-r--r--make/config/cl-kernel-if.cfg (renamed from make/resources/cl-kernel-if.cfg)0
-rw-r--r--make/config/cl-mem-if.cfg (renamed from make/resources/cl-mem-if.cfg)0
-rw-r--r--make/config/cl-platform-if.cfg (renamed from make/resources/cl-platform-if.cfg)0
-rw-r--r--make/config/cl-program-if.cfg (renamed from make/resources/cl-program-if.cfg)0
-rw-r--r--make/config/cl-queue-if.cfg (renamed from make/resources/cl-queue-if.cfg)0
-rw-r--r--make/config/cl-sampler-if.cfg (renamed from make/resources/cl-sampler-if.cfg)0
-rw-r--r--make/config/clImplCustomCode.c (renamed from make/resources/clImplCustomCode.c)0
-rw-r--r--make/config/clImplCustomCode.java (renamed from make/resources/clImplCustomCode.java)0
-rw-r--r--make/config/clgl-if.cfg (renamed from make/resources/clgl-if.cfg)0
-rw-r--r--make/config/createTagletProps.sh (renamed from make/resources/createTagletProps.sh)0
-rw-r--r--make/config/native-taglet.properties (renamed from make/resources/native-taglet.properties)0
-rw-r--r--make/resources/android/AndroidManifest-jocl.xml11
-rw-r--r--make/resources/android/AndroidManifest-test.xml20
-rw-r--r--make/resources/android/res-jocl/values/strings.xml4
-rw-r--r--make/resources/android/res-test/drawable-hdpi/icon.pngbin0 -> 2516 bytes
-rw-r--r--make/resources/android/res-test/drawable-ldpi/icon.pngbin0 -> 1172 bytes
-rw-r--r--make/resources/android/res-test/drawable-mdpi/icon.pngbin0 -> 1570 bytes
-rw-r--r--make/resources/android/res-test/layout/main.xml12
-rw-r--r--make/resources/android/res-test/values/strings.xml8
-rw-r--r--make/resources/assets-test/placeholder.txt1
-rw-r--r--make/resources/assets/placeholder.txt1
-rwxr-xr-xmake/scripts/adb-install-all-armv6.sh4
-rwxr-xr-xmake/scripts/adb-logcat.sh4
-rwxr-xr-xmake/scripts/adb-reinstall-all-armv6.sh5
-rwxr-xr-xmake/scripts/adb-uninstall-all.sh4
-rwxr-xr-xmake/scripts/java-win.bat5
-rwxr-xr-xmake/scripts/make.jocl.all.android-armv6-cross.sh4
-rwxr-xr-xmake/scripts/setenv-jocl.sh131
-rwxr-xr-xmake/scripts/tests-osx-x32.sh7
-rwxr-xr-xmake/scripts/tests-osx-x64.sh14
-rwxr-xr-xmake/scripts/tests-solx32.sh10
-rwxr-xr-xmake/scripts/tests-solx64.sh10
-rwxr-xr-xmake/scripts/tests-win.bat1
-rwxr-xr-xmake/scripts/tests-x32.bat28
-rwxr-xr-xmake/scripts/tests-x32.sh13
-rwxr-xr-xmake/scripts/tests-x64.bat25
-rwxr-xr-xmake/scripts/tests-x64.sh19
-rw-r--r--make/scripts/tests.sh111
-rw-r--r--make/stub_includes/CL_orig/cl.h (renamed from make/resources/includes/CL_orig/cl.h)0
-rw-r--r--make/stub_includes/CL_orig/cl_ext.h (renamed from make/resources/includes/CL_orig/cl_ext.h)0
-rw-r--r--make/stub_includes/CL_orig/cl_gl.h (renamed from make/resources/includes/CL_orig/cl_gl.h)0
-rw-r--r--make/stub_includes/CL_orig/cl_gl_ext.h (renamed from make/resources/includes/CL_orig/cl_gl_ext.h)0
-rw-r--r--make/stub_includes/CL_orig/cl_platform.h (renamed from make/resources/includes/CL_orig/cl_platform.h)0
-rw-r--r--make/stub_includes/CL_orig/cl_vendor_ext.h (renamed from make/resources/includes/CL_orig/cl_vendor_ext.h)0
-rw-r--r--make/stub_includes/GL3/gl3.h (renamed from make/resources/includes/GL3/gl3.h)0
-rw-r--r--make/stub_includes/GL3/glext.h (renamed from make/resources/includes/GL3/glext.h)0
-rw-r--r--make/stub_includes/common/stddef.h (renamed from make/resources/stubs_includes/common/stddef.h)0
-rw-r--r--make/stub_includes/common/stdint.h (renamed from make/resources/stubs_includes/common/stdint.h)0
-rw-r--r--make/stub_includes/gl/gltypes.h (renamed from make/resources/stubs_includes/gl/gltypes.h)0
-rw-r--r--make/stub_includes/jvm/jni.h (renamed from make/resources/stubs_includes/jvm/jni.h)0
-rw-r--r--make/stub_includes/jvm/jni_md.h (renamed from make/resources/stubs_includes/jvm/jni_md.h)0
-rw-r--r--make/stub_includes/opencl.h (renamed from make/resources/opencl.h)0
-rw-r--r--src/com/jogamp/opencl/CLPlatform.java5
-rw-r--r--src/com/jogamp/opencl/JoclVersion.java254
-rw-r--r--src/com/jogamp/opencl/util/JOCLVersion.java32
-rw-r--r--src/jogamp/opencl/os/android/JoclBaseActivity.java183
-rw-r--r--src/jogamp/opencl/os/android/JoclVersionActivity.java73
-rw-r--r--src/jogamp/opencl/os/android/JoclVersionActivityLauncher.java21
-rw-r--r--src/jogamp/opencl/os/android/MD.java32
71 files changed, 1130 insertions, 73 deletions
diff --git a/.classpath b/.classpath
index ce1f300f..6f661528 100644
--- a/.classpath
+++ b/.classpath
@@ -14,6 +14,7 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/gluegen"/>
<classpathentry combineaccessrules="false" kind="src" path="/jogl"/>
+ <classpathentry kind="lib" path="/gluegen/make/lib/android-sdk/15/android.jar" sourcepath="/gluegen/make/lib/android-sdk/15/android-java-src.zip"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
diff --git a/.externalToolBuilders/jocl-ant.launch b/.externalToolBuilders/jocl-ant.launch
index 445d387e..3d922c89 100644
--- a/.externalToolBuilders/jocl-ant.launch
+++ b/.externalToolBuilders/jocl-ant.launch
@@ -3,6 +3,12 @@
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/jocl"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
diff --git a/.gitignore b/.gitignore
index 1be4c98b..51a26a85 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
build
dist
-make/resources/includes/CL
+make/stub_includes/CL
.idea/workspace.xml
**~
-nbproject/private
diff --git a/make/build.xml b/make/build.xml
index 6cd885b2..76b9f0af 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -83,8 +83,7 @@
<!--
- Declare all paths and user defined variables.
-->
- <target name="init" depends="jogamp.env.init, gluegen.cpptasks.detect.os">
-
+ <target name="init.base" depends="jogamp.env.init,gluegen.properties.load.user,gluegen.cpptasks.detect.os">
<property name="jocl.build.number" value="manual"/>
<property name="jocl.build.id" value="${version.timestamp}"/>
<property name="jocl.version" value="${jogamp.version.base}-b${jocl.build.number}-${version.timestamp}" />
@@ -104,20 +103,19 @@
<property name="jogl.root" value="${project.root}/../jogl" />
<property name="jogl.build" value="${jogl.root}/${rootrel.build}" />
<property name="jogl-all.jar" value="${jogl.build}/jar/jogl-all.jar" />
+ </target>
- <!-- Create the classpath that includes GlueGen and
- - ANTLR. This requires the user-defined "antlr.jar"
- - property. -->
- <path id="gluegen.classpath">
- <pathelement location="${gluegen.jar}" />
- <pathelement location="${antlr.jar}" />
- </path>
+ <target name="init.android" if="android-jars.available" >
+ <property name="gluegen-rt-android.jar" value="${gluegen.build}/gluegen-rt-android.jar" />
- <path id="javac.classpath">
- <pathelement location="${gluegen.jar}" />
+ <path id="javac.android.classpath">
+ <pathelement location="${android-min.jar}"/>
+ <pathelement location="${gluegen-rt-android.jar}" />
<pathelement location="${jogl-all.jar}" />
</path>
+ </target>
+ <target name="init" depends="init.base, init.android">
<!-- Names of directories relative to the project root.
Some of these are used in FileMappers later for dependence information
and need exact string matching, which is why they use file.separator
@@ -151,28 +149,41 @@
<property name="obj" value="${project.root}/${rootrel.obj}" />
<property name="obj.jocl" value="${project.root}/${rootrel.obj.jocl}" />
+ <!-- Create the classpath that includes GlueGen and
+ - ANTLR. This requires the user-defined "antlr.jar"
+ - property. -->
+ <path id="gluegen.classpath">
+ <pathelement location="${gluegen.jar}" />
+ <pathelement location="${antlr.jar}" />
+ </path>
+
+ <path id="javac.classpath">
+ <pathelement location="${gluegen.jar}" />
+ <pathelement location="${jogl-all.jar}" />
+ </path>
+
+ <property name="config" value="${project.root}/make/config" />
+ <property name="stub.includes" value="${project.root}/make/stub_includes" />
+ <property name="stub.includes.dir" value="stub_includes" /> <!-- NOTE: this MUST be relative for FileSet -->
+
<!-- Directories used for OpenCL header file preprocessing. -->
<property name="etc.build.dir" value="${build}/etc" />
- <property name="headers.orig" value="${basedir}/resources/includes/CL_orig" />
- <property name="headers.dest" value="${basedir}/resources/includes/CL" />
+ <property name="headers.orig" value="${stub.includes}/CL_orig" />
+ <property name="headers.dest" value="${build}/includes/CL" />
<!-- The headers from which Java files are generated -->
- <property name="config" value="${project.root}/make/resources" />
- <property name="stub.includes" value="${config}/includes" />
- <property name="stub.includes.opencl" value="${config}" />
- <property name="stub.includes.dir" value="resources" /> <!-- NOTE: this MUST be relative for FileSet -->
<dirset id="stub.includes.fileset.all" dir=".">
- <include name="${stub.includes.dir}/includes"/>
- <include name="${stub.includes.dir}/stubs_includes/jvm"/>
- <include name="${stub.includes.dir}/stubs_includes/gl"/>
- <include name="${stub.includes.dir}/stubs_includes/common"/>
+ <include name="${stub.includes.dir}"/>
+ <include name="${stub.includes.dir}/jvm"/>
+ <include name="${stub.includes.dir}/gl"/>
+ <include name="${stub.includes.dir}/common"/>
</dirset>
<fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes.dir}">
- <include name="includes/CL/**" />
- <include name="includes/GL3/**" />
+ <include name="CL/**" />
+ <include name="GL3/**" />
</fileset>
<fileset id="stub.includes.dependencies.fileset.2" file="${gluegen.jar}" />
- <fileset id="stub.includes.dependencies.fileset.3" dir=".">
+ <fileset id="stub.includes.dependencies.fileset.3" dir="config">
<include name="*.cfg" />
<include name="*.java" />
<include name="*.c" />
@@ -196,10 +207,14 @@
<mkdir dir="${classes}" />
<mkdir dir="${obj}" />
<mkdir dir="${obj.jocl}" />
+ <mkdir dir="${build}/includes" />
<property name="archive.name" value="jocl-${jocl.version}-${os.and.arch}" />
<property name="archive" value="${build}/${archive.name}" />
+ <!-- optional android classes - if android -->
+ <property name="java.part.android" value="jogamp/opencl/os/android/**"/>
+
<condition property="useLinuxARMv6SFOptions">
<and>
<isset property="isLinuxARMv6"/>
@@ -356,7 +371,7 @@
<echo message="context..."/>
<echo message="incl path ${toString:stub.includes.fileset.all}"/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-context-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -367,7 +382,7 @@
</gluegen>
<echo message="program..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-program-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -378,7 +393,7 @@
</gluegen>
<echo message="kernel..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-kernel-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -389,7 +404,7 @@
</gluegen>
<echo message="queue..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-queue-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -400,7 +415,7 @@
</gluegen>
<echo message="device..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-device-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -411,7 +426,7 @@
</gluegen>
<echo message="memobj..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-mem-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -422,7 +437,7 @@
</gluegen>
<echo message="image..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-image-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -433,7 +448,7 @@
</gluegen>
<echo message="buffer..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-buffer-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -444,7 +459,7 @@
</gluegen>
<echo message="sampler..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-sampler-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -455,7 +470,7 @@
</gluegen>
<echo message="event..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-event-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -466,7 +481,7 @@
</gluegen>
<echo message="platform..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-platform-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -477,7 +492,7 @@
</gluegen>
<echo message="CL..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -488,7 +503,7 @@
</gluegen>
<echo message="CLGL..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/clgl-if.cfg"
includeRefid="stub.includes.fileset.all"
@@ -498,7 +513,7 @@
</gluegen>
<echo message="GLImpl..."/>
- <gluegen src="${stub.includes.opencl}/opencl.h"
+ <gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
config="${config}/cl-impl.cfg"
includeRefid="stub.includes.fileset.all"
@@ -521,6 +536,7 @@
<target name="java.compile" depends="java.generate">
<javac destdir="${classes}"
includeantruntime="false"
+ excludes="${java.part.android}"
memoryMaximumSize="${javac.memorymax}"
encoding="UTF-8"
source="${target.sourcelevel}"
@@ -533,6 +549,22 @@
</javac>
</target>
+ <target name="android.compile" if="android-jars.available">
+ <!--compile gluegen-rt-android last-->
+ <javac destdir="${classes}"
+ includeantruntime="false"
+ memoryMaximumSize="${javac.memorymax}"
+ encoding="UTF-8"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
+ debug="${javacdebug}" debuglevel="${javacdebuglevel}">
+ <classpath refid="javac.android.classpath"/>
+ <src path="${src.java}" />
+ <src path="${src.generated.java}" />
+ </javac>
+ </target>
+
<!-- ================================================================== -->
<!--
- Compile the native C code for JOCL.
@@ -589,7 +621,7 @@
<sysincludepath path="${java.includes.dir}"/>
<sysincludepath path="${java.includes.dir.platform}"/>
<sysincludepath path="${stub.includes.gluegen.cc}"/>
- <includepath path="resources/includes"/>
+ <includepath path="${stub.includes.dir}"/>
<!-- This is for the generated headers for handwritten C code -->
<includepath path="${src.generated.c}" />
<includepath path="${src.c}"/>
@@ -658,22 +690,46 @@
<jar manifest="tempversion" destfile="${jocl.jar}">
<fileset dir="${classes}">
<include name="com/jogamp/opencl/**" />
+ <include name="jogamp/opencl/**" />
+ <exclude name="${java.part.android}" />
+ </fileset>
+ <fileset dir="resources/assets">
+ <include name="**" />
+ </fileset>
+ </jar>
+
+ <jar manifest="tempversion" destfile="${jocl-android.jar}">
+ <fileset dir="${classes}">
+ <include name="com/jogamp/opencl/**" />
+ <include name="jogamp/opencl/**" />
+ </fileset>
+ <fileset dir="resources/assets">
+ <include name="**" />
</fileset>
</jar>
- <copy file="${jocl.jar}" tofile="${jocl-android.jar}"/>
<antcall target="android.package" inheritRefs="true" />
<delete file="tempversion"/>
</target>
- <target name="android.package" depends="init" if="isAndroid">
+ <target name="jocl.build.check.aapt" depends="init">
+ <uptodate property="jocl.build.skip.aapt">
+ <srcfiles dir= "." includes="*.xml"/>
+ <srcfiles dir= "${src.java}" includes="**"/>
+ <srcfiles dir= "${src.generated}" includes="**"/>
+ <mapper type="merge" to="${build}/jar/jocl-android-${android.abi}.apk"/>
+ </uptodate>
+ </target>
+
+ <target name="android.package" depends="init,jocl.build.check.aapt" if="isAndroid" unless="jocl.build.skip.aapt" >
<aapt.signed
+ assetsdir="resources/assets"
jarsrcdir="${src.java}"
jarbuilddir="${build}/jar"
jarbasename="jocl-android"
nativebuilddir="../${rootrel.build}/obj"
- nativebasename=""
+ nativebasename="jocl"
android.abi="${android.abi}"
androidmanifest.path="resources/android/AndroidManifest-jocl.xml"
androidresources.path="resources/android/res-jocl"
@@ -856,6 +912,7 @@
<target name="jocl.build" depends="init">
<!-- Generate and compile the Java sources. -->
<antcall target="java.compile" inheritRefs="true" />
+ <antcall target="android.compile" inheritRefs="true" />
<!-- Compile the native C sources . -->
<antcall target="c.build.jocl" inheritRefs="true" />
diff --git a/make/resources/cl-buffer-if.cfg b/make/config/cl-buffer-if.cfg
index 197ef54d..197ef54d 100644
--- a/make/resources/cl-buffer-if.cfg
+++ b/make/config/cl-buffer-if.cfg
diff --git a/make/resources/cl-common.cfg b/make/config/cl-common.cfg
index d89643b9..d89643b9 100644
--- a/make/resources/cl-common.cfg
+++ b/make/config/cl-common.cfg
diff --git a/make/resources/cl-context-if.cfg b/make/config/cl-context-if.cfg
index 0e9a5617..0e9a5617 100644
--- a/make/resources/cl-context-if.cfg
+++ b/make/config/cl-context-if.cfg
diff --git a/make/resources/cl-device-if.cfg b/make/config/cl-device-if.cfg
index a32476ca..a32476ca 100644
--- a/make/resources/cl-device-if.cfg
+++ b/make/config/cl-device-if.cfg
diff --git a/make/resources/cl-event-if.cfg b/make/config/cl-event-if.cfg
index 87b55bfd..87b55bfd 100644
--- a/make/resources/cl-event-if.cfg
+++ b/make/config/cl-event-if.cfg
diff --git a/make/resources/cl-if.cfg b/make/config/cl-if.cfg
index 2078123a..2078123a 100644
--- a/make/resources/cl-if.cfg
+++ b/make/config/cl-if.cfg
diff --git a/make/resources/cl-image-if.cfg b/make/config/cl-image-if.cfg
index 611d1bf2..611d1bf2 100644
--- a/make/resources/cl-image-if.cfg
+++ b/make/config/cl-image-if.cfg
diff --git a/make/resources/cl-impl.cfg b/make/config/cl-impl.cfg
index c2aff892..c2aff892 100644
--- a/make/resources/cl-impl.cfg
+++ b/make/config/cl-impl.cfg
diff --git a/make/resources/cl-kernel-if.cfg b/make/config/cl-kernel-if.cfg
index be9d6aa2..be9d6aa2 100644
--- a/make/resources/cl-kernel-if.cfg
+++ b/make/config/cl-kernel-if.cfg
diff --git a/make/resources/cl-mem-if.cfg b/make/config/cl-mem-if.cfg
index 11c51d19..11c51d19 100644
--- a/make/resources/cl-mem-if.cfg
+++ b/make/config/cl-mem-if.cfg
diff --git a/make/resources/cl-platform-if.cfg b/make/config/cl-platform-if.cfg
index 1a355f34..1a355f34 100644
--- a/make/resources/cl-platform-if.cfg
+++ b/make/config/cl-platform-if.cfg
diff --git a/make/resources/cl-program-if.cfg b/make/config/cl-program-if.cfg
index 7b72272f..7b72272f 100644
--- a/make/resources/cl-program-if.cfg
+++ b/make/config/cl-program-if.cfg
diff --git a/make/resources/cl-queue-if.cfg b/make/config/cl-queue-if.cfg
index 171b9332..171b9332 100644
--- a/make/resources/cl-queue-if.cfg
+++ b/make/config/cl-queue-if.cfg
diff --git a/make/resources/cl-sampler-if.cfg b/make/config/cl-sampler-if.cfg
index 5329b7f5..5329b7f5 100644
--- a/make/resources/cl-sampler-if.cfg
+++ b/make/config/cl-sampler-if.cfg
diff --git a/make/resources/clImplCustomCode.c b/make/config/clImplCustomCode.c
index 751f819b..751f819b 100644
--- a/make/resources/clImplCustomCode.c
+++ b/make/config/clImplCustomCode.c
diff --git a/make/resources/clImplCustomCode.java b/make/config/clImplCustomCode.java
index bee53425..bee53425 100644
--- a/make/resources/clImplCustomCode.java
+++ b/make/config/clImplCustomCode.java
diff --git a/make/resources/clgl-if.cfg b/make/config/clgl-if.cfg
index 1671f76c..1671f76c 100644
--- a/make/resources/clgl-if.cfg
+++ b/make/config/clgl-if.cfg
diff --git a/make/resources/createTagletProps.sh b/make/config/createTagletProps.sh
index af3312e8..af3312e8 100644
--- a/make/resources/createTagletProps.sh
+++ b/make/config/createTagletProps.sh
diff --git a/make/resources/native-taglet.properties b/make/config/native-taglet.properties
index 84477786..84477786 100644
--- a/make/resources/native-taglet.properties
+++ b/make/config/native-taglet.properties
diff --git a/make/resources/android/AndroidManifest-jocl.xml b/make/resources/android/AndroidManifest-jocl.xml
index 07fff315..2f39c9ab 100644
--- a/make/resources/android/AndroidManifest-jocl.xml
+++ b/make/resources/android/AndroidManifest-jocl.xml
@@ -13,6 +13,17 @@
android:description="@string/app_descr"
android:persistent="false"
>
+ <activity android:name="jogamp.opencl.os.android.JoclVersionActivityLauncher"
+ android:finishOnTaskLaunch="true"
+ android:launchMode="singleTop"
+ android:label="@string/activity_v_name"
+ android:description="@string/activity_v_descr"
+ >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
</application>
</manifest>
diff --git a/make/resources/android/AndroidManifest-test.xml b/make/resources/android/AndroidManifest-test.xml
new file mode 100644
index 00000000..bad971e5
--- /dev/null
+++ b/make/resources/android/AndroidManifest-test.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ sharedUserId="com.jogamp.Community"
+ package="com.jogamp.opencl.test">
+
+ <uses-library android:name="com.jogamp.common" android:required="true" />
+ <uses-library android:name="javax.media.opengl" android:required="true" />
+ <uses-library android:name="com.jogamp.opencl" android:required="true" />
+ <uses-library android:name="jogamp.android.launcher" 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"
+ android:persistent="false"
+ >
+ </application>
+
+</manifest>
diff --git a/make/resources/android/res-jocl/values/strings.xml b/make/resources/android/res-jocl/values/strings.xml
index 24038557..9834b351 100644
--- a/make/resources/android/res-jocl/values/strings.xml
+++ b/make/resources/android/res-jocl/values/strings.xml
@@ -3,6 +3,6 @@
<string name="hello">Jocl Library</string>
<string name="app_name">JogAmp\'s Jocl Library</string>
<string name="app_descr">Contains Dalvik and native code, supporting native bindings.</string>
- <string name="activity_v_name">Jocl</string>
- <string name="activity_v_descr">The Jocl Library.</string>
+ <string name="activity_v_name">Jocl\'s Version</string>
+ <string name="activity_v_descr">Shows the version of the JOCL Library and runtime CL infos.</string>
</resources>
diff --git a/make/resources/android/res-test/drawable-hdpi/icon.png b/make/resources/android/res-test/drawable-hdpi/icon.png
new file mode 100644
index 00000000..2148232c
--- /dev/null
+++ b/make/resources/android/res-test/drawable-hdpi/icon.png
Binary files differ
diff --git a/make/resources/android/res-test/drawable-ldpi/icon.png b/make/resources/android/res-test/drawable-ldpi/icon.png
new file mode 100644
index 00000000..c16211f3
--- /dev/null
+++ b/make/resources/android/res-test/drawable-ldpi/icon.png
Binary files differ
diff --git a/make/resources/android/res-test/drawable-mdpi/icon.png b/make/resources/android/res-test/drawable-mdpi/icon.png
new file mode 100644
index 00000000..1c26e3f8
--- /dev/null
+++ b/make/resources/android/res-test/drawable-mdpi/icon.png
Binary files differ
diff --git a/make/resources/android/res-test/layout/main.xml b/make/resources/android/res-test/layout/main.xml
new file mode 100644
index 00000000..3a5f117d
--- /dev/null
+++ b/make/resources/android/res-test/layout/main.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ >
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hello"
+ />
+</LinearLayout>
diff --git a/make/resources/android/res-test/values/strings.xml b/make/resources/android/res-test/values/strings.xml
new file mode 100644
index 00000000..bc47312c
--- /dev/null
+++ b/make/resources/android/res-test/values/strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="hello">Jocl Test</string>
+ <string name="app_name">Jocl Tests</string>
+ <string name="app_descr">Launches Jocl Tests</string>
+ <string name="activity_opencltest1_name">JOCLTST1</string>
+ <string name="activity_opencltest1_descr">JOCLTST1</string>
+</resources>
diff --git a/make/resources/assets-test/placeholder.txt b/make/resources/assets-test/placeholder.txt
new file mode 100644
index 00000000..efb91aa9
--- /dev/null
+++ b/make/resources/assets-test/placeholder.txt
@@ -0,0 +1 @@
+placeholder for git - can be removed when containing real assets for tests
diff --git a/make/resources/assets/placeholder.txt b/make/resources/assets/placeholder.txt
new file mode 100644
index 00000000..efb91aa9
--- /dev/null
+++ b/make/resources/assets/placeholder.txt
@@ -0,0 +1 @@
+placeholder for git - can be removed when containing real assets for tests
diff --git a/make/scripts/adb-install-all-armv6.sh b/make/scripts/adb-install-all-armv6.sh
new file mode 100755
index 00000000..3abd89c6
--- /dev/null
+++ b/make/scripts/adb-install-all-armv6.sh
@@ -0,0 +1,4 @@
+#adb $* install ../../gluegen/build-android-armv6/jogamp-android-launcher.apk
+#adb $* install ../../gluegen/build-android-armv6/gluegen-rt-android-armeabi.apk
+adb $* install ../build-android-armv6/jar/jocl-android-armeabi.apk
+adb $* install ../build-android-armv6/jar/jocl-test-android.apk
diff --git a/make/scripts/adb-logcat.sh b/make/scripts/adb-logcat.sh
new file mode 100755
index 00000000..443011f8
--- /dev/null
+++ b/make/scripts/adb-logcat.sh
@@ -0,0 +1,4 @@
+sdir=`dirname $0`
+
+adb $* logcat -c
+adb $* logcat 2>&1 | tee adb-logcat.log
diff --git a/make/scripts/adb-reinstall-all-armv6.sh b/make/scripts/adb-reinstall-all-armv6.sh
new file mode 100755
index 00000000..0e62c594
--- /dev/null
+++ b/make/scripts/adb-reinstall-all-armv6.sh
@@ -0,0 +1,5 @@
+sdir=`dirname $0`
+
+$sdir/adb-uninstall-all.sh $*
+$sdir/adb-install-all-armv6.sh $*
+
diff --git a/make/scripts/adb-uninstall-all.sh b/make/scripts/adb-uninstall-all.sh
new file mode 100755
index 00000000..7a293a9f
--- /dev/null
+++ b/make/scripts/adb-uninstall-all.sh
@@ -0,0 +1,4 @@
+#adb $* uninstall jogamp.android.launcher
+#adb $* uninstall com.jogamp.common
+adb $* uninstall com.jogamp.opencl
+adb $* uninstall com.jogamp.opencl.test
diff --git a/make/scripts/java-win.bat b/make/scripts/java-win.bat
new file mode 100755
index 00000000..2b45ae51
--- /dev/null
+++ b/make/scripts/java-win.bat
@@ -0,0 +1,5 @@
+
+REM %J2RE_HOME%\bin\java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" %D_ARGS% %X_ARGS% %* > java-win.log 2>&1
+%J2RE_HOME%\bin\java -classpath %CP_ALL% %D_ARGS% %X_ARGS% %* > java-win.log 2>&1
+tail java-win.log
+
diff --git a/make/scripts/make.jocl.all.android-armv6-cross.sh b/make/scripts/make.jocl.all.android-armv6-cross.sh
index 01c87a42..1d6a8396 100755
--- a/make/scripts/make.jocl.all.android-armv6-cross.sh
+++ b/make/scripts/make.jocl.all.android-armv6-cross.sh
@@ -1,5 +1,7 @@
#! /bin/sh
+SDIR=`dirname $0`
+
if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh ] ; then
. $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh
fi
@@ -84,7 +86,7 @@ export TARGET_PLATFORM_ROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arc
# Need to add toolchain bins to the PATH.
export PATH="$NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/17.0.0:$PATH"
-export GLUEGEN_CPPTASKS_FILE=`pwd`/../gluegen/make/lib/gluegen-cpptasks-android-armv6.xml
+export GLUEGEN_CPPTASKS_FILE=`pwd`/../../gluegen/make/lib/gluegen-cpptasks-android-armv6.xml
#export JUNIT_DISABLED="true"
#export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"
diff --git a/make/scripts/setenv-jocl.sh b/make/scripts/setenv-jocl.sh
new file mode 100755
index 00000000..72819b4e
--- /dev/null
+++ b/make/scripts/setenv-jocl.sh
@@ -0,0 +1,131 @@
+#! /bin/sh
+
+function print_usage() {
+ echo "Usage: $0 jogl-build-dir"
+}
+
+if [ -z "$1" ] ; then
+ echo JOCL BUILD DIR missing
+ print_usage
+ exit
+fi
+
+if [ -e /opt-share/etc/profile.ant ] ; then
+ . /opt-share/etc/profile.ant
+fi
+
+JOCL_BUILDDIR="$1"
+shift
+
+THISDIR=`pwd`
+
+if [ -e "$JOCL_BUILDDIR" ] ; then
+ JOCL_DIR="$JOCL_BUILDDIR/.."
+ JOCL_BUILDDIR_BASE=`basename "$JOCL_BUILDDIR"`
+else
+ echo JOCL_BUILDDIR "$JOCL_BUILDDIR" not exist or not given
+ print_usage
+ exit
+fi
+
+gpf=`find ../../gluegen/make -name jogamp-env.xml`
+if [ -z "$gpf" ] ; then
+ gpf=`find .. -name jogamp-env.xml`
+fi
+if [ -z "$gpf" ] ; then
+ echo GLUEGEN_BUILDDIR not found
+ print_usage
+ exit
+fi
+
+GLUEGEN_DIR=`dirname $gpf`/..
+GLUEGEN_BUILDDIR="$GLUEGEN_DIR"/"$JOCL_BUILDDIR_BASE"
+if [ ! -e "$GLUEGEN_BUILDDIR" ] ; then
+ echo GLUEGEN_BUILDDIR "$GLUEGEN_BUILDDIR" does not exist
+ print_usage
+ exit
+fi
+GLUEGEN_JAR="$GLUEGEN_BUILDDIR"/gluegen-rt.jar
+GLUEGEN_OS="$GLUEGEN_BUILDDIR"/obj
+JUNIT_JAR="$GLUEGEN_DIR"/make/lib/junit.jar
+
+joalpf=`find ../../joal -name joal.iml`
+if [ -z "$joalpf" ] ; then
+ joalpf=`find .. -name joal.iml`
+fi
+if [ -z "$joalpf" ] ; then
+ echo JOAL_BUILDDIR not found
+ print_usage
+ exit
+fi
+JOAL_DIR=`dirname $joalpf`
+JOAL_BUILDDIR="$JOAL_DIR"/"$JOCL_BUILDDIR_BASE"
+if [ ! -e "$JOAL_BUILDDIR" ] ; then
+ echo JOAL_BUILDDIR "$JOAL_BUILDDIR" does not exist
+ print_usage
+ exit
+fi
+JOAL_JAR="$JOAL_BUILDDIR"/jar/joal.jar
+
+joglpf=`find ../../jogl -name jogl.iml`
+if [ -z "$joglpf" ] ; then
+ joglpf=`find .. -name jogl.iml`
+fi
+if [ -z "$joglpf" ] ; then
+ echo JOGL_BUILDDIR not found
+ print_usage
+ exit
+fi
+JOGL_DIR=`dirname $joglpf`
+JOGL_BUILDDIR="$JOGL_DIR"/"$JOCL_BUILDDIR_BASE"
+if [ ! -e "$JOGL_BUILDDIR" ] ; then
+ echo JOGL_BUILDDIR "$JOGL_BUILDDIR" does not exist
+ print_usage
+ exit
+fi
+JOGL_JAR="$JOGL_BUILDDIR"/jar/jogl-all.jar
+
+if [ -z "$ANT_PATH" ] ; then
+ ANT_PATH=$(dirname $(dirname $(which ant)))
+ if [ -e $ANT_PATH/lib/ant.jar ] ; then
+ export ANT_PATH
+ echo autosetting ANT_PATH to $ANT_PATH
+ fi
+fi
+if [ -z "$ANT_PATH" ] ; then
+ echo ANT_PATH does not exist, set it
+ print_usage
+ exit
+fi
+ANT_JARS=$ANT_PATH/lib/ant.jar:$ANT_PATH/lib/ant-junit.jar
+
+JOCL_JAR="$JOCL_BUILDDIR"/jar/jocl.jar
+
+echo GLUEGEN BUILDDIR: "$GLUEGEN_BUILDDIR"
+echo JOAL BUILDDIR: "$JOAL_BUILDDIR"
+echo JOGL BUILDDIR: "$JOGL_BUILDDIR"
+echo JOCL DIR: "$JOCL_DIR"
+echo JOCL BUILDDIR: "$JOCL_BUILDDIR"
+echo JOCL BUILDDIR BASE: "$JOCL_BUILDDIR_BASE"
+
+J2RE_HOME=$(dirname $(dirname $(which java)))
+JAVA_HOME=$(dirname $(dirname $(which javac)))
+CP_SEP=:
+
+JOGAMP_ALL_CLASSPATH=.:"$GLUEGEN_JAR":"$JOAL_JAR":"$JOGL_JAR":"$JOCL_JAR":"$JUNIT_JAR":"$ANT_JARS"
+CLASSPATH="$JOGAMP_ALL_CLASSPATH"
+export JOGAMP_ALL_CLASSPATH CLASSPATH
+
+# We use TempJarCache per default now!
+#export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$GLUEGEN_OS":"$JOGL_LIB_DIR"
+#export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH":"$GLUEGEN_OS:"$JOGL_LIB_DIR"
+
+echo JOGAMP_ALL_CLASSPATH: "$JOGAMP_ALL_CLASSPATH"
+echo CLASSPATH: "$CLASSPATH"
+echo
+echo MacOSX REMEMBER to add the JVM arguments "-XstartOnFirstThread -Djava.awt.headless=true" for running demos without AWT, e.g. NEWT
+echo MacOSX REMEMBER to add the JVM arguments "-XstartOnFirstThread -Djava.awt.headless=true com.jogamp.newt.util.MainThread" for running demos with NEWT
+
+PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
+export PATH
+
diff --git a/make/scripts/tests-osx-x32.sh b/make/scripts/tests-osx-x32.sh
new file mode 100755
index 00000000..e7f4f01e
--- /dev/null
+++ b/make/scripts/tests-osx-x32.sh
@@ -0,0 +1,7 @@
+#! /bin/bash
+
+spath=`dirname $0`
+
+. $spath/tests.sh /usr/bin/java -d32 ../build-macosx $*
+
+
diff --git a/make/scripts/tests-osx-x64.sh b/make/scripts/tests-osx-x64.sh
new file mode 100755
index 00000000..5d9cd6f6
--- /dev/null
+++ b/make/scripts/tests-osx-x64.sh
@@ -0,0 +1,14 @@
+#! /bin/bash
+
+export DYLD_LIBRARY_PATH=/usr/local/libav:$DYLD_LIBRARY_PATH
+
+JAVA_HOME=`/usr/libexec/java_home -version 1.7`
+#JAVA_HOME=`/usr/libexec/java_home -version 1.7.0_25`
+#JAVA_HOME=`/usr/libexec/java_home -version 1.6.0`
+PATH=$JAVA_HOME/bin:$PATH
+export JAVA_HOME PATH
+
+spath=`dirname $0`
+
+. $spath/tests.sh $JAVA_HOME/bin/java -d64 ../build-macosx $*
+
diff --git a/make/scripts/tests-solx32.sh b/make/scripts/tests-solx32.sh
new file mode 100755
index 00000000..996dcc60
--- /dev/null
+++ b/make/scripts/tests-solx32.sh
@@ -0,0 +1,10 @@
+#! /bin/bash
+
+SDIR=`dirname $0`
+
+if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh ] ; then
+ . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh
+fi
+
+. $SDIR/tests.sh `which java` -d32 ../build-solaris-x86 $*
+
diff --git a/make/scripts/tests-solx64.sh b/make/scripts/tests-solx64.sh
new file mode 100755
index 00000000..3500f1b1
--- /dev/null
+++ b/make/scripts/tests-solx64.sh
@@ -0,0 +1,10 @@
+#! /bin/bash
+
+SDIR=`dirname $0`
+
+if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh ] ; then
+ . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh
+fi
+
+. $SDIR/tests.sh `which java` -d64 ../build-solaris-x86_64 $*
+
diff --git a/make/scripts/tests-win.bat b/make/scripts/tests-win.bat
new file mode 100755
index 00000000..583b5cde
--- /dev/null
+++ b/make/scripts/tests-win.bat
@@ -0,0 +1 @@
+scripts\java-win.bat com.jogamp.opencl.JoclVersion %*
diff --git a/make/scripts/tests-x32.bat b/make/scripts/tests-x32.bat
new file mode 100755
index 00000000..c8ead0ad
--- /dev/null
+++ b/make/scripts/tests-x32.bat
@@ -0,0 +1,28 @@
+
+set BLD_SUB=build-win32
+set J2RE_HOME=c:\jre1.7.0_45_x32
+set JAVA_HOME=c:\jdk1.7.0_45_x32
+set ANT_PATH=C:\apache-ant-1.8.2
+
+set PROJECT_ROOT=D:\projects\jogamp\jogl
+set BLD_DIR=..\%BLD_SUB%
+
+REM set FFMPEG_LIB=C:\ffmpeg_libav\lavc53_lavf53_lavu51-ffmpeg\x32
+set FFMPEG_LIB=C:\ffmpeg_libav\lavc55_lavf55_lavu52-ffmpeg\x32
+REM set FFMPEG_LIB=C:\ffmpeg_libav\lavc54_lavf54_lavu52_lavr01-libav\x32
+
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PATH%
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\angle\win32\20120127;%PATH%
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\angle\win32\20121010-chrome;%PATH%
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\PVRVFrame\OGLES-2.0\Windows_x86_32;%PATH%
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%FFMPEG_LIB%;%PATH%
+
+set BLD_DIR=..\%BLD_SUB%
+REM set LIB_DIR=..\..\gluegen\%BLD_SUB%\obj;%BLD_DIR%\lib
+set LIB_DIR=
+
+set CP_ALL=.;%BLD_DIR%\jar\jogl-all.jar;%BLD_DIR%\jar\jogl-test.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86\swt-debug.jar
+
+echo CP_ALL %CP_ALL%
+
+scripts\tests-win.bat %*
diff --git a/make/scripts/tests-x32.sh b/make/scripts/tests-x32.sh
new file mode 100755
index 00000000..858ed5fd
--- /dev/null
+++ b/make/scripts/tests-x32.sh
@@ -0,0 +1,13 @@
+#! /bin/bash
+
+SDIR=`dirname $0`
+
+if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh ] ; then
+ . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh
+fi
+
+export SWT_CLASSPATH=`pwd`/lib/swt/gtk-linux-x86/swt-debug.jar
+
+. $SDIR/tests.sh `which java` -d32 ../build-x86 $*
+
+
diff --git a/make/scripts/tests-x64.bat b/make/scripts/tests-x64.bat
new file mode 100755
index 00000000..ac74f4c9
--- /dev/null
+++ b/make/scripts/tests-x64.bat
@@ -0,0 +1,25 @@
+
+set BLD_SUB=build-win64
+set J2RE_HOME=c:\jre1.7.0_45_x64
+set JAVA_HOME=c:\jdk1.7.0_45_x64
+set ANT_PATH=C:\apache-ant-1.8.2
+
+REM set FFMPEG_LIB=C:\ffmpeg_libav\lavc53_lavf53_lavu51-ffmpeg\x64
+REM set FFMPEG_LIB=C:\ffmpeg_libav\lavc55_lavf55_lavu52-ffmpeg\x64
+set FFMPEG_LIB=C:\ffmpeg_libav\lavc55_lavf55_lavu52-ffmpeg-2013-10-09\x64
+REM set FFMPEG_LIB=C:\ffmpeg_libav\lavc54_lavf54_lavu52_lavr01-libav\x64
+
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\PVRVFrame\OGLES-2.0\Windows_x86_64;%PATH%
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%FFMPEG_LIB%;%PATH%
+
+set BLD_DIR=..\%BLD_SUB%
+REM set LIB_DIR=%BLD_DIR%\lib;..\..\gluegen\%BLD_SUB%\obj
+set LIB_DIR=
+
+set CP_ALL=.;%BLD_DIR%\jar\jogl-all.jar;%BLD_DIR%\jar\jogl-test.jar;..\..\joal\%BLD_SUB%\joal.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86_64\swt-debug.jar
+echo CP_ALL %CP_ALL%
+
+set X_ARGS="-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true"
+
+scripts\tests-win.bat %*
+
diff --git a/make/scripts/tests-x64.sh b/make/scripts/tests-x64.sh
new file mode 100755
index 00000000..fe2fc495
--- /dev/null
+++ b/make/scripts/tests-x64.sh
@@ -0,0 +1,19 @@
+#! /bin/bash
+
+SDIR=`dirname $0`
+
+#export LD_LIBRARY_PATH=/home/sven/libav-0.8/lib:$LD_LIBRARY_PATH
+#export LD_LIBRARY_PATH=/home/sven/ffmpeg-0.10/lib:$LD_LIBRARY_PATH
+
+#export LD_LIBRARY_PATH=/home/sven/libav-9.x/lib:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH=/home/sven/ffmpeg-1.2/lib:$LD_LIBRARY_PATH
+
+#export LD_LIBRARY_PATH=/home/sven/libav-10.x/lib:$LD_LIBRARY_PATH
+#export LD_LIBRARY_PATH=/home/sven/ffmpeg-2.x/lib:$LD_LIBRARY_PATH
+
+if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh ] ; then
+ . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh
+fi
+
+. $SDIR/tests.sh `which java` -d64 ../build-x86_64 $*
+
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
new file mode 100644
index 00000000..642985fd
--- /dev/null
+++ b/make/scripts/tests.sh
@@ -0,0 +1,111 @@
+#! /bin/bash
+
+if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
+ echo Usage $0 java-exe java-xargs build-dir
+ exit 0
+fi
+
+javaexe="$1"
+shift
+javaxargs=$1
+shift
+bdir="$1"
+shift
+
+if [ ! -x "$javaexe" ] ; then
+ echo java-exe "$javaexe" is not an executable
+ exit 1
+fi
+if [ ! -d "$bdir" ] ; then
+ echo build-dir "$bdir" is not a directory
+ exit 1
+fi
+
+rm -f java-run.log
+
+spath=`dirname $0`
+
+. $spath/setenv-jocl.sh "$bdir"
+unset CLASSPATH
+
+MOSX=0
+MOSX_MT=0
+uname -a | grep -i Darwin && MOSX=1
+if [ $MOSX -eq 1 ] ; then
+ echo setup OSX environment vars
+ #export NSZombieEnabled=YES
+ export NSTraceEvents=YES
+ #export OBJC_PRINT_EXCEPTIONS=YES
+ echo NSZombieEnabled $NSZombieEnabled 2>&1 | tee -a java-run.log
+ echo NSTraceEvents $NSTraceEvents 2>&1 | tee -a java-run.log
+ echo OBJC_PRINT_EXCEPTIONS $OBJC_PRINT_EXCEPTIONS 2>&1 | tee -a java-run.log
+ MOSX_MT=1
+fi
+
+#export LD_LIBRARY_PATH=/opt-linux-x86_64/opencl-lala/lib64:$LD_LIBRARY_PATH
+
+which "$javaexe" 2>&1 | tee -a java-run.log
+"$javaexe" -version 2>&1 | tee -a java-run.log
+echo LD_LIBRARY_PATH $LD_LIBRARY_PATH 2>&1 | tee -a java-run.log
+echo "$javaexe" $javaxargs $X_ARGS $D_ARGS $* 2>&1 | tee -a java-run.log
+echo MacOsX $MOSX
+
+function jrun() {
+ awton=$1
+ shift
+
+ #D_ARGS="-Djocl.debug.DebugCL -Djocl.debug.TraceCL"
+
+ #D_ARGS="-Djogamp.debug=all"
+ #D_ARGS="-Dnativewindow.debug=all"
+ #D_ARGS="-Djogl.debug=all"
+ #D_ARGS="-Dnewt.debug=all"
+ #D_ARGS="-Djocl=all"
+
+ #X_ARGS="-verbose:jni"
+ #X_ARGS="-Xrs"
+
+ if [ $awton -eq 1 ] ; then
+ export CLASSPATH=$JOGAMP_ALL_CLASSPATH
+ echo CLASSPATH $CLASSPATH
+ X_ARGS="-Djava.awt.headless=false $X_ARGS"
+ else
+ export CLASSPATH=$JOGAMP_ALL_CLASSPATH
+ X_ARGS="-Djava.awt.headless=true $X_ARGS"
+ fi
+ if [ ! -z "$CUSTOM_CLASSPATH" ] ; then
+ export CLASSPATH=$CUSTOM_CLASSPATH:$CLASSPATH
+ fi
+ echo CLASSPATH $CLASSPATH
+ if [ $MOSX_MT -eq 1 ] ; then
+ if [ $awton -eq 0 ] ; then
+ # No AWT, No SWT -> Preserve Main-Thread
+ X_ARGS="-XstartOnFirstThread $X_ARGS"
+ C_ARG="com.jogamp.newt.util.MainThread"
+ fi
+ fi
+ echo
+ echo "Test Start: $*"
+ echo
+ echo "$javaexe" $javaxargs $X_ARGS $D_ARGS $C_ARG $*
+ #gdb --args "$javaexe" $javaxargs $X_ARGS $D_ARGS $C_ARG $*
+ "$javaexe" $javaxargs $X_ARGS $D_ARGS $C_ARG $*
+ echo
+ echo "Test End: $*"
+ echo
+}
+
+function testnoawt() {
+ jrun 0 $* 2>&1 | tee -a java-run.log
+}
+
+function testawt() {
+ MOSX_MT=0
+ jrun 1 $* 2>&1 | tee -a java-run.log
+}
+
+#
+# Version
+#
+testnoawt com.jogamp.opencl.JoclVersion $*
+
diff --git a/make/resources/includes/CL_orig/cl.h b/make/stub_includes/CL_orig/cl.h
index 4f21afe5..4f21afe5 100644
--- a/make/resources/includes/CL_orig/cl.h
+++ b/make/stub_includes/CL_orig/cl.h
diff --git a/make/resources/includes/CL_orig/cl_ext.h b/make/stub_includes/CL_orig/cl_ext.h
index 7310fd2b..7310fd2b 100644
--- a/make/resources/includes/CL_orig/cl_ext.h
+++ b/make/stub_includes/CL_orig/cl_ext.h
diff --git a/make/resources/includes/CL_orig/cl_gl.h b/make/stub_includes/CL_orig/cl_gl.h
index 3b4fe069..3b4fe069 100644
--- a/make/resources/includes/CL_orig/cl_gl.h
+++ b/make/stub_includes/CL_orig/cl_gl.h
diff --git a/make/resources/includes/CL_orig/cl_gl_ext.h b/make/stub_includes/CL_orig/cl_gl_ext.h
index fbf8b326..fbf8b326 100644
--- a/make/resources/includes/CL_orig/cl_gl_ext.h
+++ b/make/stub_includes/CL_orig/cl_gl_ext.h
diff --git a/make/resources/includes/CL_orig/cl_platform.h b/make/stub_includes/CL_orig/cl_platform.h
index c8c6d7f6..c8c6d7f6 100644
--- a/make/resources/includes/CL_orig/cl_platform.h
+++ b/make/stub_includes/CL_orig/cl_platform.h
diff --git a/make/resources/includes/CL_orig/cl_vendor_ext.h b/make/stub_includes/CL_orig/cl_vendor_ext.h
index a01a3535..a01a3535 100644
--- a/make/resources/includes/CL_orig/cl_vendor_ext.h
+++ b/make/stub_includes/CL_orig/cl_vendor_ext.h
diff --git a/make/resources/includes/GL3/gl3.h b/make/stub_includes/GL3/gl3.h
index 176ddb16..176ddb16 100644
--- a/make/resources/includes/GL3/gl3.h
+++ b/make/stub_includes/GL3/gl3.h
diff --git a/make/resources/includes/GL3/glext.h b/make/stub_includes/GL3/glext.h
index 8e40956e..8e40956e 100644
--- a/make/resources/includes/GL3/glext.h
+++ b/make/stub_includes/GL3/glext.h
diff --git a/make/resources/stubs_includes/common/stddef.h b/make/stub_includes/common/stddef.h
index f6c7207b..f6c7207b 100644
--- a/make/resources/stubs_includes/common/stddef.h
+++ b/make/stub_includes/common/stddef.h
diff --git a/make/resources/stubs_includes/common/stdint.h b/make/stub_includes/common/stdint.h
index 4e456608..4e456608 100644
--- a/make/resources/stubs_includes/common/stdint.h
+++ b/make/stub_includes/common/stdint.h
diff --git a/make/resources/stubs_includes/gl/gltypes.h b/make/stub_includes/gl/gltypes.h
index 3272b72a..3272b72a 100644
--- a/make/resources/stubs_includes/gl/gltypes.h
+++ b/make/stub_includes/gl/gltypes.h
diff --git a/make/resources/stubs_includes/jvm/jni.h b/make/stub_includes/jvm/jni.h
index be01d018..be01d018 100644
--- a/make/resources/stubs_includes/jvm/jni.h
+++ b/make/stub_includes/jvm/jni.h
diff --git a/make/resources/stubs_includes/jvm/jni_md.h b/make/stub_includes/jvm/jni_md.h
index 44978627..44978627 100644
--- a/make/resources/stubs_includes/jvm/jni_md.h
+++ b/make/stub_includes/jvm/jni_md.h
diff --git a/make/resources/opencl.h b/make/stub_includes/opencl.h
index 28b874e7..28b874e7 100644
--- a/make/resources/opencl.h
+++ b/make/stub_includes/opencl.h
diff --git a/src/com/jogamp/opencl/CLPlatform.java b/src/com/jogamp/opencl/CLPlatform.java
index 99b2e16d..4015dc26 100644
--- a/src/com/jogamp/opencl/CLPlatform.java
+++ b/src/com/jogamp/opencl/CLPlatform.java
@@ -49,7 +49,6 @@ import com.jogamp.opencl.util.CLUtil;
import com.jogamp.opencl.llb.impl.CLImpl;
import com.jogamp.opencl.spi.CLAccessorFactory;
import com.jogamp.opencl.util.Filter;
-import com.jogamp.opencl.util.JOCLVersion;
import java.nio.IntBuffer;
import java.util.ArrayList;
@@ -168,10 +167,10 @@ public class CLPlatform {
}
cl = new CLImpl();
}catch(UnsatisfiedLinkError ex) {
- System.err.println(JOCLVersion.getAllVersions());
+ System.err.println(JoclVersion.getInstance().getAllVersions(null).toString());
throw ex;
}catch(Exception ex) {
- System.err.println(JOCLVersion.getAllVersions());
+ System.err.println(JoclVersion.getInstance().getAllVersions(null).toString());
throw new JogampRuntimeException("JOCL initialization error.", ex);
}
diff --git a/src/com/jogamp/opencl/JoclVersion.java b/src/com/jogamp/opencl/JoclVersion.java
new file mode 100644
index 00000000..206f6356
--- /dev/null
+++ b/src/com/jogamp/opencl/JoclVersion.java
@@ -0,0 +1,254 @@
+/**
+ * Copyright 2014 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+
+package com.jogamp.opencl;
+
+import static com.jogamp.common.util.VersionUtil.getPlatformInfo;
+
+import com.jogamp.common.GlueGenVersion;
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.VersionUtil;
+import com.jogamp.common.util.JogampVersion;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.jar.Manifest;
+
+public class JoclVersion extends JogampVersion {
+
+ protected static volatile JoclVersion jogampCommonVersionInfo;
+
+ protected JoclVersion(String packageName, Manifest mf) {
+ super(packageName, mf);
+ }
+
+ public static JoclVersion getInstance() {
+ if(null == jogampCommonVersionInfo) { // volatile: ok
+ synchronized(JoclVersion.class) {
+ if( null == jogampCommonVersionInfo ) {
+ final String packageName = "com.jogamp.opencl";
+ final Manifest mf = VersionUtil.getManifest(JoclVersion.class.getClassLoader(), packageName);
+ jogampCommonVersionInfo = new JoclVersion(packageName, mf);
+ }
+ }
+ }
+ return jogampCommonVersionInfo;
+ }
+
+ public StringBuilder getAllVersions(StringBuilder sb) {
+ if(null==sb) {
+ sb = new StringBuilder();
+ }
+
+ try{
+ getPlatformInfo(sb);
+ sb.append(Platform.getNewline());
+ GlueGenVersion.getInstance().toString(sb);
+ sb.append(Platform.getNewline());
+ toString(sb);
+ sb.append(Platform.getNewline());
+ } catch (Exception e) {
+ sb.append(e.getMessage());
+ e.printStackTrace();
+ }
+
+ return sb;
+ }
+
+ private volatile int maxKeyStrlen = -1;
+
+ public StringBuilder getOpenCLTextInfo(StringBuilder sb) {
+ if(null==sb) {
+ sb = new StringBuilder();
+ }
+
+ final CLPlatform[] platforms;
+ try {
+ platforms = CLPlatform.listCLPlatforms();
+ } catch (Throwable t) {
+ final Throwable cause;
+ {
+ Throwable pre = null;
+ Throwable next = t;
+ while( null != next ) {
+ pre = next;
+ next = next.getCause();
+ }
+ cause = pre;
+ }
+ System.err.println("CLPlatform.listCLPlatforms() failed, exception: "+cause.getMessage());
+ t.printStackTrace();
+ sb.append("CLPlatform.listCLPlatforms() failed, exception: "+cause.getMessage());
+ StringWriter stackTrace = new StringWriter();
+ cause.printStackTrace(new PrintWriter(stackTrace));
+ sb.append(stackTrace.toString());
+ return sb;
+ }
+
+ // platforms
+ final List<Map<String, String>> platProps = new ArrayList<Map<String, String>>();
+ if( 0 > maxKeyStrlen ) {
+ synchronized(this) {
+ if( 0 > maxKeyStrlen ) {
+ for (CLPlatform p : platforms) {
+ platProps.add(p.getProperties());
+ final CLDevice[] devices = p.listCLDevices();
+ for (CLDevice d : devices) {
+ final Map<String,String> props = d.getProperties();
+ final Set<Map.Entry<String, String>> entries = props.entrySet();
+ for(Map.Entry<String, String> e : entries) {
+ maxKeyStrlen = Math.max(maxKeyStrlen, e.getKey().length());
+ }
+ }
+ }
+ }
+ }
+ }
+ sb.append(String.format("PP:DD:EE - Platform (PP), Device (DD), Entry (EE)%n"));
+ int pI = 0;
+ for (CLPlatform p : platforms) {
+ pI++;
+ platProps.add(p.getProperties());
+ CLDevice[] devices = p.listCLDevices();
+ int dI = 0;
+ for (CLDevice d : devices) {
+ dI++;
+ final Map<String,String> props = d.getProperties();
+ final Set<Map.Entry<String, String>> entries = props.entrySet();
+ int eI = 0;
+ for(Map.Entry<String, String> e : entries) {
+ eI++;
+ sb.append(String.format("%02d:%02d:%02d %"+maxKeyStrlen+"s: %s%n", pI, dI, eI, e.getKey(), e.getValue()));
+ }
+ }
+ }
+ return sb;
+ }
+
+ public StringBuilder getOpenCLHtmlInfo(StringBuilder sb) {
+ if(null==sb) {
+ sb = new StringBuilder();
+ }
+
+ final CLPlatform[] platforms;
+ try {
+ platforms = CLPlatform.listCLPlatforms();
+ } catch (Throwable t) {
+ final Throwable cause;
+ {
+ Throwable pre = null;
+ Throwable next = t;
+ while( null != next ) {
+ pre = next;
+ next = next.getCause();
+ }
+ cause = pre;
+ }
+ System.err.println("CLPlatform.listCLPlatforms() failed, exception: "+cause.getMessage());
+ t.printStackTrace();
+ sb.append("<pre>CLPlatform.listCLPlatforms() failed, exception: "+cause.getMessage());
+ StringWriter stackTrace = new StringWriter();
+ cause.printStackTrace(new PrintWriter(stackTrace));
+ sb.append(stackTrace.toString()).append("</pre>");
+ return sb;
+ }
+ sb.append("<table border=\"1\">");
+
+ // platforms
+ List<Map<String, String>> platProps = new ArrayList<Map<String, String>>();
+ List<Integer> spans = new ArrayList<Integer>();
+ for (CLPlatform p : platforms) {
+ platProps.add(p.getProperties());
+ spans.add(p.listCLDevices().length);
+ }
+ fillHtmlTable(platProps, spans, sb);
+
+ // devices
+ ArrayList<Map<String, String>> devProps = new ArrayList<Map<String, String>>();
+ for (CLPlatform p : platforms) {
+ CLDevice[] devices = p.listCLDevices();
+ for (CLDevice d : devices) {
+ devProps.add(d.getProperties());
+ }
+ }
+ fillHtmlTable(devProps, sb);
+ sb.append("</table>");
+
+ return sb;
+ }
+
+ private static void fillHtmlTable(List<Map<String, String>> properties, StringBuilder sb) {
+ ArrayList<Integer> spans = new ArrayList<Integer>(properties.size());
+ for (int i = 0; i < properties.size(); i++) {
+ spans.add(1);
+ }
+ fillHtmlTable(properties, spans, sb);
+ }
+
+ private static void fillHtmlTable(List<Map<String, String>> properties, List<Integer> spans, StringBuilder sb) {
+ boolean header = true;
+ for (String key : properties.get(0).keySet()) {
+ sb.append("<tr>");
+ htmlCell(sb, key);
+ int i = 0;
+ for (Map<String, String> map : properties) {
+ htmlCell(sb, spans.get(i), map.get(key), header);
+ i++;
+ }
+ sb.append("</tr>");
+ header = false;
+ }
+ }
+
+ private static void htmlCell(StringBuilder sb, String value) {
+ sb.append("<td>").append(value).append("</td>");
+ }
+
+ private static void htmlCell(StringBuilder sb, int span, String value, boolean header) {
+ if(header) {
+ sb.append("<th colspan=\"").append(span).append("\">").append(value).append("</th>");
+ }else{
+ sb.append("<td colspan=\"").append(span).append("\">").append(value).append("</td>");
+ }
+ }
+
+ public static void main(String args[]) {
+ System.err.println(VersionUtil.getPlatformInfo());
+ System.err.println(GlueGenVersion.getInstance());
+ // System.err.println(NativeWindowVersion.getInstance());
+ final JoclVersion v = JoclVersion.getInstance();
+ System.err.println(v.toString());
+ System.err.println(v.getOpenCLTextInfo(null).toString());
+ // System.err.println(v.getOpenCLHtmlInfo(null).toString());
+ }
+}
+
diff --git a/src/com/jogamp/opencl/util/JOCLVersion.java b/src/com/jogamp/opencl/util/JOCLVersion.java
index 48dd2a9e..7ffa3eb6 100644
--- a/src/com/jogamp/opencl/util/JOCLVersion.java
+++ b/src/com/jogamp/opencl/util/JOCLVersion.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -36,6 +36,7 @@ import com.jogamp.common.os.Platform;
import com.jogamp.common.util.JogampVersion;
import com.jogamp.common.util.VersionUtil;
import com.jogamp.opencl.llb.CL;
+
import java.security.PrivilegedAction;
import java.util.jar.Manifest;
@@ -45,6 +46,7 @@ import static com.jogamp.common.util.VersionUtil.*;
/**
* Utility for querying module versions and environment properties.
* @author Michael Bien
+ * @deprecated Use {@link com.jogamp.opencl.JoclVersion}
*/
public class JOCLVersion extends JogampVersion {
@@ -75,14 +77,10 @@ public class JOCLVersion extends JogampVersion {
final StringBuilder sb = new StringBuilder();
try{
- sb.append(getPlatformInfo(null));
+ getPlatformInfo(sb);
+ sb.append(Platform.getNewline());
+ GlueGenVersion.getInstance().toString(sb);
sb.append(Platform.getNewline());
- }catch(Exception e) {
- sb.append(e.getMessage());
- e.printStackTrace();
- }
-
- try{
createInstance().toString(sb);
sb.append(Platform.getNewline());
}catch(Exception e) {
@@ -90,18 +88,6 @@ public class JOCLVersion extends JogampVersion {
e.printStackTrace();
}
- try{
- doPrivileged(new PrivilegedAction<Object>() {
- @Override public Object run() {
- sb.append(GlueGenVersion.getInstance().toString());
- return null;
- }
- });
- }catch(Exception e) {
- sb.append(e.getMessage());
- e.printStackTrace();
- }
-
return sb.toString();
}
diff --git a/src/jogamp/opencl/os/android/JoclBaseActivity.java b/src/jogamp/opencl/os/android/JoclBaseActivity.java
new file mode 100644
index 00000000..207f5192
--- /dev/null
+++ b/src/jogamp/opencl/os/android/JoclBaseActivity.java
@@ -0,0 +1,183 @@
+/**
+ * Copyright 2014 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+package jogamp.opencl.os.android;
+
+import android.app.Activity;
+import android.content.Context;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.WindowManager;
+
+public class JoclBaseActivity extends Activity {
+ boolean isDelegatedActivity;
+ Activity rootActivity;
+ boolean setThemeCalled = false;
+
+ public JoclBaseActivity() {
+ super();
+ isDelegatedActivity = false;
+ rootActivity = this;
+ }
+
+ public void setRootActivity(Activity rootActivity) {
+ this.rootActivity = rootActivity;
+ this.isDelegatedActivity = this != rootActivity;
+ }
+
+ public final boolean isDelegatedActivity() {
+ return isDelegatedActivity;
+ }
+
+ public final Activity getActivity() {
+ return rootActivity;
+ }
+
+ /**
+ * Convenient method to set the Android window's flags to fullscreen or size-layout depending on the given NEWT window.
+ * <p>
+ * Must be called before creating the view and adding any content, i.e. setContentView() !
+ * </p>
+ * @param androidWindow
+ * @param newtWindow
+ */
+ public void setFullscreenFeature(android.view.Window androidWindow, boolean fullscreen) {
+ if(null == androidWindow) {
+ throw new IllegalArgumentException("Android or Window null");
+ }
+
+ if( fullscreen ) {
+ androidWindow.requestFeature(android.view.Window.FEATURE_NO_TITLE);
+ androidWindow.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
+ androidWindow.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
+ } else {
+ androidWindow.addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
+ androidWindow.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
+ }
+ }
+
+ /**
+ * Convenient method to set this context's theme to transparency.
+ * <p>
+ * Must be called before creating the view and adding any content, i.e. setContentView() !
+ * </p>
+ * <p>
+ * Is normally issued by {@link #setContentView(android.view.Window, Window)}
+ * if the requested NEWT Capabilities ask for transparency.
+ * </p>
+ * <p>
+ * Can be called only once.
+ * </p>
+ */
+ public void setTransparencyTheme() {
+ if(!setThemeCalled) {
+ setThemeCalled = true;
+ final Context ctx = getActivity().getApplicationContext();
+ final String frn = ctx.getPackageName()+":style/Theme.Transparent";
+ final int resID = ctx.getResources().getIdentifier("Theme.Transparent", "style", ctx.getPackageName());
+ if(0 == resID) {
+ Log.d(MD.TAG, "SetTransparencyTheme: Resource n/a: "+frn);
+ } else {
+ Log.d(MD.TAG, "SetTransparencyTheme: Setting style: "+frn+": 0x"+Integer.toHexString(resID));
+ ctx.setTheme(resID);
+ }
+ }
+ }
+
+ @Override
+ public android.view.Window getWindow() {
+ if( isDelegatedActivity() ) {
+ return getActivity().getWindow();
+ } else {
+ return super.getWindow();
+ }
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ Log.d(MD.TAG, "onCreate.0");
+ if(!isDelegatedActivity()) {
+ super.onCreate(savedInstanceState);
+ }
+ jogamp.common.os.android.StaticContext.init(rootActivity.getApplicationContext());
+ Log.d(MD.TAG, "onCreate.X");
+ }
+
+ @Override
+ public void onStart() {
+ Log.d(MD.TAG, "onStart.0");
+ if(!isDelegatedActivity()) {
+ super.onStart();
+ }
+ Log.d(MD.TAG, "onStart.X");
+ }
+
+ @Override
+ public void onRestart() {
+ Log.d(MD.TAG, "onRestart.0");
+ if(!isDelegatedActivity()) {
+ super.onRestart();
+ }
+ Log.d(MD.TAG, "onRestart.X");
+ }
+
+ @Override
+ public void onResume() {
+ Log.d(MD.TAG, "onResume.0");
+ if(!isDelegatedActivity()) {
+ super.onResume();
+ }
+ Log.d(MD.TAG, "onResume.X");
+ }
+
+ @Override
+ public void onPause() {
+ Log.d(MD.TAG, "onPause.0");
+ if( !isDelegatedActivity() ) {
+ super.onPause();
+ }
+ Log.d(MD.TAG, "onPause.X");
+ }
+
+ @Override
+ public void onStop() {
+ Log.d(MD.TAG, "onStop.0");
+ if( !isDelegatedActivity() ) {
+ super.onStop();
+ }
+ Log.d(MD.TAG, "onStop.X");
+ }
+
+ @Override
+ public void onDestroy() {
+ Log.d(MD.TAG, "onDestroy.0");
+ if(!isDelegatedActivity()) {
+ super.onDestroy();
+ }
+ Log.d(MD.TAG, "onDestroy.X");
+ }
+}
diff --git a/src/jogamp/opencl/os/android/JoclVersionActivity.java b/src/jogamp/opencl/os/android/JoclVersionActivity.java
new file mode 100644
index 00000000..3f7a5fb0
--- /dev/null
+++ b/src/jogamp/opencl/os/android/JoclVersionActivity.java
@@ -0,0 +1,73 @@
+/**
+ * Copyright 2014 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+package jogamp.opencl.os.android;
+
+import com.jogamp.common.GlueGenVersion;
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.VersionUtil;
+import com.jogamp.opencl.JoclVersion;
+
+import android.os.Bundle;
+import android.util.Log;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.ScrollView;
+import android.widget.TextView;
+
+public class JoclVersionActivity extends JoclBaseActivity {
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setFullscreenFeature(getWindow(), true);
+
+ final Window androidWindow = getWindow();
+ androidWindow.requestFeature(android.view.Window.FEATURE_NO_TITLE);
+ androidWindow.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
+ androidWindow.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
+
+ final android.view.ViewGroup viewGroup = new android.widget.FrameLayout(getActivity().getApplicationContext());
+ getWindow().setContentView(viewGroup);
+
+ final TextView tv = new TextView(getActivity());
+ final ScrollView scroller = new ScrollView(getActivity());
+ scroller.addView(tv);
+ setContentView(scroller);
+
+ final JoclVersion joclVersion = JoclVersion.getInstance();
+ final String info1 = "JOCL Version Info"+Platform.NEWLINE+
+ VersionUtil.getPlatformInfo()+Platform.NEWLINE+
+ GlueGenVersion.getInstance()+Platform.NEWLINE+
+ joclVersion.toString()+Platform.NEWLINE+
+ joclVersion.getOpenCLTextInfo(null).toString()+Platform.NEWLINE;
+ tv.setText(info1);
+
+ Log.d(MD.TAG, "onCreate - X");
+ }
+}
diff --git a/src/jogamp/opencl/os/android/JoclVersionActivityLauncher.java b/src/jogamp/opencl/os/android/JoclVersionActivityLauncher.java
new file mode 100644
index 00000000..4080250d
--- /dev/null
+++ b/src/jogamp/opencl/os/android/JoclVersionActivityLauncher.java
@@ -0,0 +1,21 @@
+package jogamp.opencl.os.android;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.util.Log;
+
+public class JoclVersionActivityLauncher extends Activity {
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ final Uri uri = Uri.parse("launch://jogamp.org/jogamp.opencl.os.android.JoclVersionActivity?sys=com.jogamp.common&sys=javax.media.opengl&sys=com.jogamp.opencl&pkg=com.jogamp.opencl.test&jogamp.debug=all&jocl.debug=all");
+ final Intent intent = new Intent("org.jogamp.launcher.action.LAUNCH_ACTIVITY_NORMAL", uri);
+ Log.d(getClass().getSimpleName(), "Launching Activity: "+intent);
+ startActivity (intent);
+
+ finish(); // done
+ }
+}
diff --git a/src/jogamp/opencl/os/android/MD.java b/src/jogamp/opencl/os/android/MD.java
new file mode 100644
index 00000000..8adb40e9
--- /dev/null
+++ b/src/jogamp/opencl/os/android/MD.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright 2014 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+package jogamp.opencl.os.android;
+
+public class MD {
+ public static final String TAG = "JogAmp.JOCL";
+}