diff options
author | Sven Gothel <[email protected]> | 2014-01-26 02:59:12 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-01-26 02:59:12 +0100 |
commit | 87135467c4f292f7e43bc3957784b0e43769c9cc (patch) | |
tree | 949a4737151f3690bf8448422a45ebc1ae1546bc | |
parent | b6150bbc67a207669a2e820dd5b08e7e75b24200 (diff) |
Script: Correct joal.jar path; Remove redundant NewtDebugActivity (Debug is on for NewtVersionActivity)
9 files changed, 90 insertions, 197 deletions
diff --git a/make/resources/android/AndroidManifest-jogl.xml b/make/resources/android/AndroidManifest-jogl.xml index d9a9ac819..1b6c46356 100644 --- a/make/resources/android/AndroidManifest-jogl.xml +++ b/make/resources/android/AndroidManifest-jogl.xml @@ -28,18 +28,6 @@ <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> - <activity android:name="jogamp.newt.driver.android.NewtDebugActivityLauncher" - android:finishOnTaskLaunch="true" - android:launchMode="singleTop" - android:configChanges="keyboardHidden|orientation" - android:label="@string/activity_debug_name" - android:description="@string/activity_debug_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/res-jogl/values/strings.xml b/make/resources/android/res-jogl/values/strings.xml index ae4816665..e88a0a4e0 100644 --- a/make/resources/android/res-jogl/values/strings.xml +++ b/make/resources/android/res-jogl/values/strings.xml @@ -5,6 +5,4 @@ <string name="app_descr">Contains Dalvik and native code, supporting native bindings.</string> <string name="activity_version_name">Jogl\'s Version</string> <string name="activity_version_descr">Shows the version of the JOGL Library and runtime GL infos.</string> - <string name="activity_debug_name">Jogl Debug</string> - <string name="activity_debug_descr">Debug output of JOGL\'s initialization.</string> </resources> diff --git a/make/scripts/make.jogl.all.android-armv6-cross.sh b/make/scripts/make.jogl.all.android-armv6-cross.sh index 2b8f9a30e..1b5f5bf44 100755 --- a/make/scripts/make.jogl.all.android-armv6-cross.sh +++ b/make/scripts/make.jogl.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 diff --git a/make/scripts/setenv-jogl.sh b/make/scripts/setenv-jogl.sh index 186da5505..dc121a596 100755 --- a/make/scripts/setenv-jogl.sh +++ b/make/scripts/setenv-jogl.sh @@ -73,7 +73,7 @@ if [ ! -e "$JOAL_BUILDDIR" ] ; then print_usage exit fi -JOAL_JAR="$JOAL_BUILDDIR"/joal.jar +JOAL_JAR="$JOAL_BUILDDIR"/jar/joal.jar if [ -z "$ANT_PATH" ] ; then ANT_PATH=$(dirname $(dirname $(which ant))) diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtDebugActivity.java b/src/newt/classes/jogamp/newt/driver/android/NewtDebugActivity.java deleted file mode 100644 index 40a6ec6dc..000000000 --- a/src/newt/classes/jogamp/newt/driver/android/NewtDebugActivity.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright 2013 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.newt.driver.android; - -import android.os.Bundle; - -public class NewtDebugActivity extends NewtVersionBaseActivity { - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate("NewtDebugActivity - DEBUG MODE", savedInstanceState); - } -} diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtDebugActivityLauncher.java b/src/newt/classes/jogamp/newt/driver/android/NewtDebugActivityLauncher.java deleted file mode 100644 index 9d16fdec5..000000000 --- a/src/newt/classes/jogamp/newt/driver/android/NewtDebugActivityLauncher.java +++ /dev/null @@ -1,21 +0,0 @@ -package jogamp.newt.driver.android; - -import android.app.Activity; -import android.content.Intent; -import android.net.Uri; -import android.os.Bundle; -import android.util.Log; - -public class NewtDebugActivityLauncher extends Activity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - final Uri uri = Uri.parse("launch://jogamp.org/jogamp.newt.driver.android.NewtDebugActivity?sys=com.jogamp.common&sys=javax.media.opengl&pkg=com.jogamp.opengl.test&jogamp.debug=all&nativewindow.debug=all&jogl.debug=all&newt.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/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java b/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java index 8a7f3af87..259acb8f3 100644 --- a/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java +++ b/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java @@ -27,11 +27,95 @@ */ package jogamp.newt.driver.android; +import javax.media.opengl.GL; +import javax.media.opengl.GLAutoDrawable; +import javax.media.opengl.GLCapabilities; +import javax.media.opengl.GLEventListener; +import javax.media.opengl.GLProfile; + +import com.jogamp.common.GlueGenVersion; +import com.jogamp.common.os.Platform; +import com.jogamp.common.util.VersionUtil; +import com.jogamp.newt.opengl.GLWindow; +import com.jogamp.opengl.JoglVersion; + import android.os.Bundle; +import android.util.Log; +import android.view.Gravity; +import android.view.ViewGroup.LayoutParams; +import android.widget.ScrollView; +import android.widget.TextView; + +public class NewtVersionActivity extends NewtBaseActivity { -public class NewtVersionActivity extends NewtVersionBaseActivity { @Override public void onCreate(Bundle savedInstanceState) { - super.onCreate("NewtVersionActivity - NORMAL MODE", savedInstanceState); + super.onCreate(savedInstanceState); + + setFullscreenFeature(getWindow(), true); + + 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); + viewGroup.addView(scroller, new android.widget.FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, Gravity.TOP|Gravity.LEFT)); + + final String info1 = "JOGL Version Info"+Platform.NEWLINE+VersionUtil.getPlatformInfo()+Platform.NEWLINE+GlueGenVersion.getInstance()+Platform.NEWLINE+JoglVersion.getInstance()+Platform.NEWLINE; + Log.d(MD.TAG, info1); + tv.setText(info1); + + final GLProfile glp; + if( GLProfile.isAvailable(GLProfile.GL2ES2) ) { + glp = GLProfile.get(GLProfile.GL2ES2); + } else if( GLProfile.isAvailable(GLProfile.GL2ES1) ) { + glp = GLProfile.get(GLProfile.GL2ES1); + } else { + glp = null; + tv.append("No GLProfile GL2ES2 nor GL2ES1 available!"); + } + if( null != glp ) { + // create GLWindow (-> incl. underlying NEWT Display, Screen & Window) + GLCapabilities caps = new GLCapabilities(glp); + GLWindow glWindow = GLWindow.create(caps); + glWindow.setUndecorated(true); + glWindow.setSize(32, 32); + glWindow.setPosition(0, 0); + final android.view.View androidGLView = ((WindowDriver)glWindow.getDelegatedWindow()).getAndroidView(); + viewGroup.addView(androidGLView, new android.widget.FrameLayout.LayoutParams(glWindow.getWidth(), glWindow.getHeight(), Gravity.BOTTOM|Gravity.RIGHT)); + registerNEWTWindow(glWindow); + + glWindow.addGLEventListener(new GLEventListener() { + public void init(GLAutoDrawable drawable) { + GL gl = drawable.getGL(); + final StringBuilder sb = new StringBuilder(); + sb.append(JoglVersion.getGLInfo(gl, null, true)).append(Platform.NEWLINE); + sb.append("Requested: ").append(Platform.NEWLINE); + sb.append(drawable.getNativeSurface().getGraphicsConfiguration().getRequestedCapabilities()).append(Platform.NEWLINE).append(Platform.NEWLINE); + sb.append("Chosen: ").append(Platform.NEWLINE); + sb.append(drawable.getChosenGLCapabilities()).append(Platform.NEWLINE).append(Platform.NEWLINE); + final String info2 = sb.toString(); + // Log.d(MD.TAG, info2); // too big! + System.err.println(info2); + viewGroup.post(new Runnable() { + public void run() { + tv.append(info2); + viewGroup.removeView(androidGLView); + } } ); + } + + public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { + } + + public void display(GLAutoDrawable drawable) { + } + + public void dispose(GLAutoDrawable drawable) { + } + }); + glWindow.setVisible(true); + } + Log.d(MD.TAG, "onCreate - X"); } } diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivityLauncher.java b/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivityLauncher.java index 3374e4184..553900f6a 100644 --- a/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivityLauncher.java +++ b/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivityLauncher.java @@ -11,7 +11,7 @@ public class NewtVersionActivityLauncher extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - final Uri uri = Uri.parse("launch://jogamp.org/jogamp.newt.driver.android.NewtVersionActivity?sys=com.jogamp.common&sys=javax.media.opengl&pkg=com.jogamp.opengl.test"); + final Uri uri = Uri.parse("launch://jogamp.org/jogamp.newt.driver.android.NewtVersionActivity?sys=com.jogamp.common&sys=javax.media.opengl&pkg=com.jogamp.opengl.test&jogamp.debug=all&nativewindow.debug=all&jogl.debug=all&newt.debug=all"); final Intent intent = new Intent("org.jogamp.launcher.action.LAUNCH_ACTIVITY_NORMAL", uri); Log.d(getClass().getSimpleName(), "Launching Activity: "+intent); startActivity (intent); diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtVersionBaseActivity.java b/src/newt/classes/jogamp/newt/driver/android/NewtVersionBaseActivity.java deleted file mode 100644 index f24fb20ac..000000000 --- a/src/newt/classes/jogamp/newt/driver/android/NewtVersionBaseActivity.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Copyright 2011 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.newt.driver.android; - -import javax.media.opengl.GL; -import javax.media.opengl.GLAutoDrawable; -import javax.media.opengl.GLCapabilities; -import javax.media.opengl.GLEventListener; -import javax.media.opengl.GLProfile; - -import com.jogamp.common.GlueGenVersion; -import com.jogamp.common.os.Platform; -import com.jogamp.common.util.VersionUtil; -import com.jogamp.newt.opengl.GLWindow; -import com.jogamp.opengl.JoglVersion; - -import android.os.Bundle; -import android.util.Log; -import android.view.Gravity; -import android.view.ViewGroup.LayoutParams; -import android.widget.ScrollView; -import android.widget.TextView; - -public class NewtVersionBaseActivity extends NewtBaseActivity { - - public void onCreate(String prefix, Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - setFullscreenFeature(getWindow(), true); - - 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); - viewGroup.addView(scroller, new android.widget.FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, Gravity.TOP|Gravity.LEFT)); - - final String info1 = prefix+Platform.NEWLINE+VersionUtil.getPlatformInfo()+Platform.NEWLINE+GlueGenVersion.getInstance()+Platform.NEWLINE+JoglVersion.getInstance()+Platform.NEWLINE; - Log.d(MD.TAG, info1); - tv.setText(info1); - - final GLProfile glp; - if( GLProfile.isAvailable(GLProfile.GL2ES2) ) { - glp = GLProfile.get(GLProfile.GL2ES2); - } else if( GLProfile.isAvailable(GLProfile.GL2ES1) ) { - glp = GLProfile.get(GLProfile.GL2ES1); - } else { - glp = null; - tv.append("No GLProfile GL2ES2 nor GL2ES1 available!"); - } - if( null != glp ) { - // create GLWindow (-> incl. underlying NEWT Display, Screen & Window) - GLCapabilities caps = new GLCapabilities(glp); - GLWindow glWindow = GLWindow.create(caps); - glWindow.setUndecorated(true); - glWindow.setSize(32, 32); - glWindow.setPosition(0, 0); - final android.view.View androidGLView = ((WindowDriver)glWindow.getDelegatedWindow()).getAndroidView(); - viewGroup.addView(androidGLView, new android.widget.FrameLayout.LayoutParams(glWindow.getWidth(), glWindow.getHeight(), Gravity.BOTTOM|Gravity.RIGHT)); - registerNEWTWindow(glWindow); - - glWindow.addGLEventListener(new GLEventListener() { - public void init(GLAutoDrawable drawable) { - GL gl = drawable.getGL(); - final StringBuilder sb = new StringBuilder(); - sb.append(JoglVersion.getGLInfo(gl, null, true)).append(Platform.NEWLINE); - sb.append("Requested: ").append(Platform.NEWLINE); - sb.append(drawable.getNativeSurface().getGraphicsConfiguration().getRequestedCapabilities()).append(Platform.NEWLINE).append(Platform.NEWLINE); - sb.append("Chosen: ").append(Platform.NEWLINE); - sb.append(drawable.getChosenGLCapabilities()).append(Platform.NEWLINE).append(Platform.NEWLINE); - final String info2 = sb.toString(); - // Log.d(MD.TAG, info2); // too big! - System.err.println(info2); - viewGroup.post(new Runnable() { - public void run() { - tv.append(info2); - viewGroup.removeView(androidGLView); - } } ); - } - - public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { - } - - public void display(GLAutoDrawable drawable) { - } - - public void dispose(GLAutoDrawable drawable) { - } - }); - glWindow.setVisible(true); - } - Log.d(MD.TAG, "onCreate - X"); - } -} |