summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-06-15 05:21:43 +0200
committerSven Gothel <[email protected]>2012-06-15 05:21:43 +0200
commit54d0ff131097a2cd9a91a0c1dd84deb8b1f7d0ac (patch)
treecea4abac21e1447c8725e8bd28abf031be4dbedd /src
parentcf51a97f04011ce643c42d6872f37cc69f4342aa (diff)
Fix Bug 583: Remove Android compile-time dependencies and exclude Android specific classes for non Android platforms.
Adapt to GlueGen commits: b3c9951006f9bd863244f1db3d54ac7866d66f0a, 86c1df6fdca183454ff544857f4236b646c4730d Ensure same Java JAR content regardless of build target (fix). Separate Android compilation results: jogl.all-android.jar and jogl.test-android.jar avoiding generating different content w/ non android builds. Adding ${android.abi} to APK target name (jogl.all-android.apk -> jogl.all-android-armeabi-v7a.apk) if not generic.
Diffstat (limited to 'src')
-rw-r--r--src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java17
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java19
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java17
3 files changed, 17 insertions, 36 deletions
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java
index 889e0944e..e850b9310 100644
--- a/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java
+++ b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java
@@ -79,5 +79,20 @@ public class NEWTRedSquareES2Activity extends NewtBaseActivity {
glWindow.resetFPSCounter();
Log.d(TAG, "onCreate - X");
- }
+ }
+
+ @Override
+ public void onResume() {
+ // android.os.Debug.startMethodTracing("GearsES2.trace");
+ // android.os.Debug.startAllocCounting();
+ super.onResume();
+ }
+
+ @Override
+ public void onPause() {
+ // android.os.Debug.stopAllocCounting();
+ // android.os.Debug.stopMethodTracing();
+ super.onPause();
+ }
+
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
index 21aca0487..6246b3e87 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
@@ -179,10 +179,6 @@ public class GearsES2 implements GLEventListener {
System.err.println(Thread.currentThread()+" GearsES2.init FIN");
}
- public void enableAndroidTrace(boolean v) {
- useAndroidDebug = v;
- }
-
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
// System.err.println(Thread.currentThread()+" GearsES2.reshape "+x+"/"+y+" "+width+"x"+height+", swapInterval "+swapInterval);
GL2ES2 gl = drawable.getGL().getGL2ES2();
@@ -205,24 +201,11 @@ public class GearsES2 implements GLEventListener {
st.uniform(gl, pmvMatrixUniform);
st.useProgram(gl, false);
- if(useAndroidDebug) {
- try {
- android.os.Debug.startMethodTracing("GearsES2.trace");
- // android.os.Debug.startAllocCounting();
- useAndroidDebug = true;
- } catch (NoClassDefFoundError e) { useAndroidDebug=false; }
- }
-
// System.err.println(Thread.currentThread()+" GearsES2.reshape FIN");
}
- private boolean useAndroidDebug = false;
+ // private boolean useAndroidDebug = false;
public void dispose(GLAutoDrawable drawable) {
- if(useAndroidDebug) {
- // android.os.Debug.stopAllocCounting();
- android.os.Debug.stopMethodTracing();
- }
-
System.err.println(Thread.currentThread()+" GearsES2.dispose ... ");
if (drawable instanceof Window) {
Window window = (Window) drawable;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
index a24662568..620267125 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
@@ -156,10 +156,6 @@ public class RedSquareES2 implements GLEventListener {
st.useProgram(gl, false);
}
- public void enableAndroidTrace(boolean v) {
- useAndroidDebug = v;
- }
-
public void reshape(GLAutoDrawable glad, int x, int y, int width, int height) {
System.err.println(Thread.currentThread()+" RedSquareES2.reshape "+x+"/"+y+" "+width+"x"+height+", swapInterval "+swapInterval);
GL2ES2 gl = glad.getGL().getGL2ES2();
@@ -173,23 +169,10 @@ public class RedSquareES2 implements GLEventListener {
st.uniform(gl, pmvMatrixUniform);
st.useProgram(gl, false);
- if(useAndroidDebug) {
- try {
- android.os.Debug.startMethodTracing("RedSquareES2.trace");
- // android.os.Debug.startAllocCounting();
- useAndroidDebug = true;
- } catch (NoClassDefFoundError e) { useAndroidDebug=false; }
- }
-
System.err.println(Thread.currentThread()+" RedSquareES2.reshape FIN");
}
- private boolean useAndroidDebug = false;
public void dispose(GLAutoDrawable glad) {
- if(useAndroidDebug) {
- // android.os.Debug.stopAllocCounting();
- android.os.Debug.stopMethodTracing();
- }
System.err.println(Thread.currentThread()+" RedSquareES2.dispose ... ");
if (null != glWindow) {
glWindow.removeMouseListener(myMouse);