From a095b7da968533120306ff9ef019685b6698272c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 4 Oct 2011 02:48:22 +0200 Subject: Graph Shader Simplification, 'a'/'b' redefined; GraphUI 2-pass demo; Graph Shader Simplification - remove enable factor and 2nd 'discard' branch - use build-in 'max'/'clamp' functions, supposed to be faster Graph Shader 'a'/'b' redefined - 'a' is 1-pass shader only - 'b' is 2-pass incl. (1st pass + 2nd pass) - Works well on ARM Mali-400 MP (Galaxy S2). - Doesn't work on NV tegra2 (P1202: Texture's gl states do not match with shader's), however 2-pass on mobile seems to be overkill for now. We may create a workaround (switch shader ..). GraphUI 2-pass demo; - Propagate renderModes and texSize to UIShape's render(..) - TODO: Remove GL dependency in UIShape, maybe use a callback or visitor model - Adding GarpUI 2-pass launcher (Android and Standalone) --- .../android/launcher/NEWTLauncherGraphUI1pActivity.java | 15 +++++++++++++++ .../android/launcher/NEWTLauncherGraphUI2pActivity.java | 15 +++++++++++++++ .../android/launcher/NEWTLauncherGraphUIActivity.java | 15 --------------- 3 files changed, 30 insertions(+), 15 deletions(-) create mode 100644 src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI1pActivity.java create mode 100644 src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI2pActivity.java delete mode 100644 src/android/com/jogamp/android/launcher/NEWTLauncherGraphUIActivity.java (limited to 'src/android/com/jogamp') diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI1pActivity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI1pActivity.java new file mode 100644 index 000000000..1af0de1f2 --- /dev/null +++ b/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI1pActivity.java @@ -0,0 +1,15 @@ +package com.jogamp.android.launcher; + +public class NEWTLauncherGraphUI1pActivity extends NEWTLauncherActivity { + static String demo = "com.jogamp.opengl.test.android.NEWTGraphUI1pActivity"; + static String pkg = "com.jogamp.opengl.test"; + + @Override + public String getUserActivityName() { + return demo; + } + @Override + public String getUserPackageName() { + return pkg; + } +} diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI2pActivity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI2pActivity.java new file mode 100644 index 000000000..0a5f8d265 --- /dev/null +++ b/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI2pActivity.java @@ -0,0 +1,15 @@ +package com.jogamp.android.launcher; + +public class NEWTLauncherGraphUI2pActivity extends NEWTLauncherActivity { + static String demo = "com.jogamp.opengl.test.android.NEWTGraphUI2pActivity"; + static String pkg = "com.jogamp.opengl.test"; + + @Override + public String getUserActivityName() { + return demo; + } + @Override + public String getUserPackageName() { + return pkg; + } +} diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUIActivity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUIActivity.java deleted file mode 100644 index 6a185fecc..000000000 --- a/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUIActivity.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.jogamp.android.launcher; - -public class NEWTLauncherGraphUIActivity extends NEWTLauncherActivity { - static String demo = "com.jogamp.opengl.test.android.NEWTGraphUIActivity"; - static String pkg = "com.jogamp.opengl.test"; - - @Override - public String getUserActivityName() { - return demo; - } - @Override - public String getUserPackageName() { - return pkg; - } -} -- cgit v1.2.3