From 76da2b16bcb7b760660a9cf91cf6457acf526a6b Mon Sep 17 00:00:00 2001 From: Mark Raynsford Date: Sun, 2 Dec 2012 22:46:30 +0000 Subject: Initial jp4da setup --- maven/jp4da/.gitignore | 5 + maven/jp4da/.project | 17 ++ .../.settings/org.eclipse.core.resources.prefs | 2 + maven/jp4da/.settings/org.eclipse.m2e.core.prefs | 4 + maven/jp4da/jp4da-android/.classpath | 24 ++ maven/jp4da/jp4da-android/.project | 39 +++ .../.settings/org.eclipse.core.resources.prefs | 6 + .../.settings/org.eclipse.jdt.core.prefs | 5 + .../.settings/org.eclipse.m2e.core.prefs | 4 + maven/jp4da/jp4da-android/AndroidManifest.xml | 16 ++ maven/jp4da/jp4da-android/ant.properties | 17 ++ .../gen/com/io7m/examples/jp4da/BuildConfig.java | 6 + .../gen/com/io7m/examples/jp4da/R.java | 19 ++ maven/jp4da/jp4da-android/local.properties | 10 + maven/jp4da/jp4da-android/pom.xml | 292 +++++++++++++++++++++ maven/jp4da/jp4da-android/proguard-project.txt | 20 ++ maven/jp4da/jp4da-android/project.properties | 14 + maven/jp4da/jp4da-android/res/layout/main.xml | 14 + maven/jp4da/jp4da-android/res/values/strings.xml | 4 + .../java/com/io7m/examples/jp4da/MainActivity.java | 67 +++++ maven/jp4da/jp4da-core/.classpath | 36 +++ maven/jp4da/jp4da-core/.project | 23 ++ .../.settings/org.eclipse.core.resources.prefs | 6 + .../.settings/org.eclipse.jdt.core.prefs | 5 + .../.settings/org.eclipse.m2e.core.prefs | 4 + maven/jp4da/jp4da-core/pom.xml | 43 +++ .../main/java/com/io7m/examples/jp4da/Example.java | 40 +++ maven/jp4da/jp4da-desktop/.classpath | 36 +++ maven/jp4da/jp4da-desktop/.project | 23 ++ .../.settings/org.eclipse.core.resources.prefs | 6 + .../.settings/org.eclipse.jdt.core.prefs | 5 + .../.settings/org.eclipse.m2e.core.prefs | 4 + maven/jp4da/jp4da-desktop/pom.xml | 61 +++++ .../com/io7m/examples/jp4da/DesktopExample.java | 56 ++++ maven/jp4da/pom.xml | 26 ++ 35 files changed, 959 insertions(+) create mode 100644 maven/jp4da/.gitignore create mode 100644 maven/jp4da/.project create mode 100644 maven/jp4da/.settings/org.eclipse.core.resources.prefs create mode 100644 maven/jp4da/.settings/org.eclipse.m2e.core.prefs create mode 100644 maven/jp4da/jp4da-android/.classpath create mode 100644 maven/jp4da/jp4da-android/.project create mode 100644 maven/jp4da/jp4da-android/.settings/org.eclipse.core.resources.prefs create mode 100644 maven/jp4da/jp4da-android/.settings/org.eclipse.jdt.core.prefs create mode 100644 maven/jp4da/jp4da-android/.settings/org.eclipse.m2e.core.prefs create mode 100644 maven/jp4da/jp4da-android/AndroidManifest.xml create mode 100644 maven/jp4da/jp4da-android/ant.properties create mode 100644 maven/jp4da/jp4da-android/gen/com/io7m/examples/jp4da/BuildConfig.java create mode 100644 maven/jp4da/jp4da-android/gen/com/io7m/examples/jp4da/R.java create mode 100644 maven/jp4da/jp4da-android/local.properties create mode 100644 maven/jp4da/jp4da-android/pom.xml create mode 100644 maven/jp4da/jp4da-android/proguard-project.txt create mode 100644 maven/jp4da/jp4da-android/project.properties create mode 100644 maven/jp4da/jp4da-android/res/layout/main.xml create mode 100644 maven/jp4da/jp4da-android/res/values/strings.xml create mode 100644 maven/jp4da/jp4da-android/src/main/java/com/io7m/examples/jp4da/MainActivity.java create mode 100644 maven/jp4da/jp4da-core/.classpath create mode 100644 maven/jp4da/jp4da-core/.project create mode 100644 maven/jp4da/jp4da-core/.settings/org.eclipse.core.resources.prefs create mode 100644 maven/jp4da/jp4da-core/.settings/org.eclipse.jdt.core.prefs create mode 100644 maven/jp4da/jp4da-core/.settings/org.eclipse.m2e.core.prefs create mode 100644 maven/jp4da/jp4da-core/pom.xml create mode 100644 maven/jp4da/jp4da-core/src/main/java/com/io7m/examples/jp4da/Example.java create mode 100644 maven/jp4da/jp4da-desktop/.classpath create mode 100644 maven/jp4da/jp4da-desktop/.project create mode 100644 maven/jp4da/jp4da-desktop/.settings/org.eclipse.core.resources.prefs create mode 100644 maven/jp4da/jp4da-desktop/.settings/org.eclipse.jdt.core.prefs create mode 100644 maven/jp4da/jp4da-desktop/.settings/org.eclipse.m2e.core.prefs create mode 100644 maven/jp4da/jp4da-desktop/pom.xml create mode 100644 maven/jp4da/jp4da-desktop/src/main/java/com/io7m/examples/jp4da/DesktopExample.java create mode 100644 maven/jp4da/pom.xml (limited to 'maven/jp4da') diff --git a/maven/jp4da/.gitignore b/maven/jp4da/.gitignore new file mode 100644 index 0000000..eaf2fd7 --- /dev/null +++ b/maven/jp4da/.gitignore @@ -0,0 +1,5 @@ +jp4da-android/target +jp4da-android/bin +jp4da-android/libs +jp4da-core/target +jp4da-desktop/target diff --git a/maven/jp4da/.project b/maven/jp4da/.project new file mode 100644 index 0000000..f202624 --- /dev/null +++ b/maven/jp4da/.project @@ -0,0 +1,17 @@ + + + jp4da + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/maven/jp4da/.settings/org.eclipse.core.resources.prefs b/maven/jp4da/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/maven/jp4da/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/maven/jp4da/.settings/org.eclipse.m2e.core.prefs b/maven/jp4da/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/maven/jp4da/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/maven/jp4da/jp4da-android/.classpath b/maven/jp4da/jp4da-android/.classpath new file mode 100644 index 0000000..9d5b680 --- /dev/null +++ b/maven/jp4da/jp4da-android/.classpath @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maven/jp4da/jp4da-android/.project b/maven/jp4da/jp4da-android/.project new file mode 100644 index 0000000..a38df40 --- /dev/null +++ b/maven/jp4da/jp4da-android/.project @@ -0,0 +1,39 @@ + + + jp4da-android + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/maven/jp4da/jp4da-android/.settings/org.eclipse.core.resources.prefs b/maven/jp4da/jp4da-android/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..29abf99 --- /dev/null +++ b/maven/jp4da/jp4da-android/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/maven/jp4da/jp4da-android/.settings/org.eclipse.jdt.core.prefs b/maven/jp4da/jp4da-android/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..abec6ca --- /dev/null +++ b/maven/jp4da/jp4da-android/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/maven/jp4da/jp4da-android/.settings/org.eclipse.m2e.core.prefs b/maven/jp4da/jp4da-android/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/maven/jp4da/jp4da-android/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/maven/jp4da/jp4da-android/AndroidManifest.xml b/maven/jp4da/jp4da-android/AndroidManifest.xml new file mode 100644 index 0000000..87a4683 --- /dev/null +++ b/maven/jp4da/jp4da-android/AndroidManifest.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/maven/jp4da/jp4da-android/ant.properties b/maven/jp4da/jp4da-android/ant.properties new file mode 100644 index 0000000..b0971e8 --- /dev/null +++ b/maven/jp4da/jp4da-android/ant.properties @@ -0,0 +1,17 @@ +# This file is used to override default values used by the Ant build system. +# +# This file must be checked into Version Control Systems, as it is +# integral to the build system of your project. + +# This file is only used by the Ant script. + +# You can use this to override default values such as +# 'source.dir' for the location of your java source folder and +# 'out.dir' for the location of your output folder. + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. + diff --git a/maven/jp4da/jp4da-android/gen/com/io7m/examples/jp4da/BuildConfig.java b/maven/jp4da/jp4da-android/gen/com/io7m/examples/jp4da/BuildConfig.java new file mode 100644 index 0000000..0946581 --- /dev/null +++ b/maven/jp4da/jp4da-android/gen/com/io7m/examples/jp4da/BuildConfig.java @@ -0,0 +1,6 @@ +/** Automatically generated file. DO NOT MODIFY */ +package com.io7m.examples.jp4da; + +public final class BuildConfig { + public final static boolean DEBUG = true; +} \ No newline at end of file diff --git a/maven/jp4da/jp4da-android/gen/com/io7m/examples/jp4da/R.java b/maven/jp4da/jp4da-android/gen/com/io7m/examples/jp4da/R.java new file mode 100644 index 0000000..b3a441d --- /dev/null +++ b/maven/jp4da/jp4da-android/gen/com/io7m/examples/jp4da/R.java @@ -0,0 +1,19 @@ +/* AUTO-GENERATED FILE. DO NOT MODIFY. + * + * This class was automatically generated by the + * aapt tool from the resource data it found. It + * should not be modified by hand. + */ + +package com.io7m.examples.jp4da; + +public final class R { + public static final class attr { + } + public static final class layout { + public static final int main=0x7f020000; + } + public static final class string { + public static final int app_name=0x7f030000; + } +} diff --git a/maven/jp4da/jp4da-android/local.properties b/maven/jp4da/jp4da-android/local.properties new file mode 100644 index 0000000..9e8740e --- /dev/null +++ b/maven/jp4da/jp4da-android/local.properties @@ -0,0 +1,10 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. + +# location of the SDK. This is only used by Ant +# For customization when using a Version Control System, please read the +# header note. +sdk.dir=/home/m0/local/android-sdk-linux diff --git a/maven/jp4da/jp4da-android/pom.xml b/maven/jp4da/jp4da-android/pom.xml new file mode 100644 index 0000000..54c7b9b --- /dev/null +++ b/maven/jp4da/jp4da-android/pom.xml @@ -0,0 +1,292 @@ + + + + 4.0.0 + com.io7m.examples.jp4da + jp4da-android + 1.0.0 + jp4da-android + Android code + apk + + + UTF-8 + UTF-8 + + + + + com.io7m.examples.jp4da + jp4da-core + 1.0.0 + + + + + + org.jogamp.jogl + jogl-all + + + + + + com.google.android + android + 1.6_r2 + provided + + + + + org.jogamp.gluegen + gluegen-rt-android + 2.0-rc11 + + + + org.jogamp.gluegen + gluegen-rt + 2.0-rc11 + natives-android-armv6 + + + + org.jogamp.jogl + jogl-all-android + 2.0-rc11 + + + + org.jogamp.jogl + jogl-all + 2.0-rc11 + natives-android-armv6 + runtime + + + + + ${project.artifactId} + + + + + com.jayway.maven.plugins.android.generation2 + android-maven-plugin + 3.4.2-SNAPSHOT + true + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.apache.maven.plugins + + + maven-dependency-plugin + + [2.6,) + + unpack + + + + + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.6 + + + + + + unpack-jogl-natives + generate-resources + + unpack + + + + + org.jogamp.jogl + jogl-all + 2.0-rc11 + natives-android-armv6 + true + ${project.basedir}/libs/armeabi + lib*.so + + + + + + + + + + unpack-jogl-assets + generate-resources + + unpack + + + + + org.jogamp.jogl + jogl-all-android + 2.0-rc11 + true + ${project.basedir}/assets + **/*.class + + + + + + + + + unpack-gluegen-natives + generate-resources + + unpack + + + + + org.jogamp.gluegen + gluegen-rt + 2.0-rc11 + natives-android-armv6 + true + ${project.basedir}/libs/armeabi + lib*.so + + + + + + + + + + + maven-clean-plugin + 2.5 + + + + ${project.basedir}/libs/armeabi + + libgluegen-rt.so + libnewt.so + libjogl_mobile.so + + false + + + + + + ${project.basedir}/assets + + META-INF/** + com/** + jogl/** + jogamp/** + javax/** + + false + + + + + + + + + com.jayway.maven.plugins.android.generation2 + android-maven-plugin + + + 8 + + + + + + apk + + + + jogl-.*\.jar$ + gluegen-rt-.*\.jar$ + + + + + + + + + diff --git a/maven/jp4da/jp4da-android/proguard-project.txt b/maven/jp4da/jp4da-android/proguard-project.txt new file mode 100644 index 0000000..f2fe155 --- /dev/null +++ b/maven/jp4da/jp4da-android/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/maven/jp4da/jp4da-android/project.properties b/maven/jp4da/jp4da-android/project.properties new file mode 100644 index 0000000..85aac54 --- /dev/null +++ b/maven/jp4da/jp4da-android/project.properties @@ -0,0 +1,14 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-8 diff --git a/maven/jp4da/jp4da-android/res/layout/main.xml b/maven/jp4da/jp4da-android/res/layout/main.xml new file mode 100644 index 0000000..c74a6df --- /dev/null +++ b/maven/jp4da/jp4da-android/res/layout/main.xml @@ -0,0 +1,14 @@ + + + + + + + diff --git a/maven/jp4da/jp4da-android/res/values/strings.xml b/maven/jp4da/jp4da-android/res/values/strings.xml new file mode 100644 index 0000000..0be1647 --- /dev/null +++ b/maven/jp4da/jp4da-android/res/values/strings.xml @@ -0,0 +1,4 @@ + + + MainActivity + diff --git a/maven/jp4da/jp4da-android/src/main/java/com/io7m/examples/jp4da/MainActivity.java b/maven/jp4da/jp4da-android/src/main/java/com/io7m/examples/jp4da/MainActivity.java new file mode 100644 index 0000000..9a9dd77 --- /dev/null +++ b/maven/jp4da/jp4da-android/src/main/java/com/io7m/examples/jp4da/MainActivity.java @@ -0,0 +1,67 @@ +package com.io7m.examples.jp4da; + +import javax.media.opengl.GLCapabilities; +import javax.media.opengl.GLProfile; + +import jogamp.newt.driver.android.NewtBaseActivity; +import android.os.Bundle; + +import com.jogamp.newt.ScreenMode; +import com.jogamp.newt.event.MouseAdapter; +import com.jogamp.newt.event.MouseEvent; +import com.jogamp.newt.event.ScreenModeListener; +import com.jogamp.newt.opengl.GLWindow; +import com.jogamp.opengl.util.Animator; + +public class MainActivity extends NewtBaseActivity +{ + @Override public void onCreate( + final Bundle state) + { + super.onCreate(state); + + final GLCapabilities caps = + new GLCapabilities(GLProfile.get(GLProfile.GLES2)); + final GLWindow gl_window = GLWindow.create(caps); + gl_window.setFullscreen(true); + + this.setContentView(this.getWindow(), gl_window); + + gl_window.addMouseListener(new MouseAdapter() { + @Override public void mousePressed( + final MouseEvent e) + { + if (e.getPressure() > 2f) { // show Keyboard + ((com.jogamp.newt.Window) e.getSource()).setKeyboardVisible(true); + } + } + }); + + final Example example = new Example(); + + // demo.enableAndroidTrace(true); + gl_window.addGLEventListener(example); + gl_window.getScreen().addScreenModeListener(new ScreenModeListener() { + @SuppressWarnings("unused") public void screenModeChangeNotify( + final ScreenMode sm) + { + // Nothing. + } + + @SuppressWarnings("unused") public void screenModeChanged( + final ScreenMode sm, + final boolean success) + { + System.err.println("ScreenMode Changed: " + sm); + } + }); + + final Animator animator = new Animator(gl_window); + this.setAnimator(animator); + + gl_window.setVisible(true); + animator.setUpdateFPSFrames(60, System.err); + animator.resetFPSCounter(); + gl_window.resetFPSCounter(); + } +} diff --git a/maven/jp4da/jp4da-core/.classpath b/maven/jp4da/jp4da-core/.classpath new file mode 100644 index 0000000..534b5e5 --- /dev/null +++ b/maven/jp4da/jp4da-core/.classpath @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maven/jp4da/jp4da-core/.project b/maven/jp4da/jp4da-core/.project new file mode 100644 index 0000000..c2c6d70 --- /dev/null +++ b/maven/jp4da/jp4da-core/.project @@ -0,0 +1,23 @@ + + + jp4da-core + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/maven/jp4da/jp4da-core/.settings/org.eclipse.core.resources.prefs b/maven/jp4da/jp4da-core/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..29abf99 --- /dev/null +++ b/maven/jp4da/jp4da-core/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/maven/jp4da/jp4da-core/.settings/org.eclipse.jdt.core.prefs b/maven/jp4da/jp4da-core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..60105c1 --- /dev/null +++ b/maven/jp4da/jp4da-core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/maven/jp4da/jp4da-core/.settings/org.eclipse.m2e.core.prefs b/maven/jp4da/jp4da-core/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/maven/jp4da/jp4da-core/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/maven/jp4da/jp4da-core/pom.xml b/maven/jp4da/jp4da-core/pom.xml new file mode 100644 index 0000000..49cb507 --- /dev/null +++ b/maven/jp4da/jp4da-core/pom.xml @@ -0,0 +1,43 @@ + + + + 4.0.0 + com.io7m.examples.jp4da + jp4da-core + 1.0.0 + jp4da-core + Common code + jar + + + UTF-8 + UTF-8 + + + + + org.jogamp.jogl + jogl-all + 2.0-rc11 + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + + 1.6 + 1.6 + + + + + + diff --git a/maven/jp4da/jp4da-core/src/main/java/com/io7m/examples/jp4da/Example.java b/maven/jp4da/jp4da-core/src/main/java/com/io7m/examples/jp4da/Example.java new file mode 100644 index 0000000..5675b95 --- /dev/null +++ b/maven/jp4da/jp4da-core/src/main/java/com/io7m/examples/jp4da/Example.java @@ -0,0 +1,40 @@ +package com.io7m.examples.jp4da; + +import javax.media.opengl.GL; +import javax.media.opengl.GL2ES2; +import javax.media.opengl.GLAutoDrawable; +import javax.media.opengl.GLEventListener; + +public class Example implements GLEventListener +{ + @Override public void display( + final GLAutoDrawable drawable) + { + final GL2ES2 gl = drawable.getGL().getGL2ES2(); + + gl.glClearColor(0f, 0f, 1.0f, 1f); + gl.glClear(GL.GL_COLOR_BUFFER_BIT); + } + + @Override public void dispose( + @SuppressWarnings("unused") final GLAutoDrawable drawable) + { + // Nothing. + } + + @Override public void init( + @SuppressWarnings("unused") final GLAutoDrawable drawable) + { + // Nothing. + } + + @Override public void reshape( + @SuppressWarnings("unused") final GLAutoDrawable drawable, + @SuppressWarnings("unused") final int x, + @SuppressWarnings("unused") final int y, + @SuppressWarnings("unused") final int w, + @SuppressWarnings("unused") final int h) + { + // Nothing. + } +} diff --git a/maven/jp4da/jp4da-desktop/.classpath b/maven/jp4da/jp4da-desktop/.classpath new file mode 100644 index 0000000..534b5e5 --- /dev/null +++ b/maven/jp4da/jp4da-desktop/.classpath @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maven/jp4da/jp4da-desktop/.project b/maven/jp4da/jp4da-desktop/.project new file mode 100644 index 0000000..3f56db4 --- /dev/null +++ b/maven/jp4da/jp4da-desktop/.project @@ -0,0 +1,23 @@ + + + jp4da-desktop + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/maven/jp4da/jp4da-desktop/.settings/org.eclipse.core.resources.prefs b/maven/jp4da/jp4da-desktop/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..29abf99 --- /dev/null +++ b/maven/jp4da/jp4da-desktop/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/maven/jp4da/jp4da-desktop/.settings/org.eclipse.jdt.core.prefs b/maven/jp4da/jp4da-desktop/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..60105c1 --- /dev/null +++ b/maven/jp4da/jp4da-desktop/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/maven/jp4da/jp4da-desktop/.settings/org.eclipse.m2e.core.prefs b/maven/jp4da/jp4da-desktop/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/maven/jp4da/jp4da-desktop/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/maven/jp4da/jp4da-desktop/pom.xml b/maven/jp4da/jp4da-desktop/pom.xml new file mode 100644 index 0000000..ef13263 --- /dev/null +++ b/maven/jp4da/jp4da-desktop/pom.xml @@ -0,0 +1,61 @@ + + + + 4.0.0 + com.io7m.examples.jp4da + jp4da-desktop + 1.0.0 + jp4da-desktop + Desktop code + jar + + + UTF-8 + UTF-8 + + + + + com.io7m.examples.jp4da + jp4da-core + 1.0.0 + + + org.jogamp.jogl + jogl-all + + + + + + + org.jogamp.gluegen + gluegen-rt-main + 2.0-rc11 + + + org.jogamp.jogl + jogl-all-main + 2.0-rc11 + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + + 1.6 + 1.6 + + + + + + diff --git a/maven/jp4da/jp4da-desktop/src/main/java/com/io7m/examples/jp4da/DesktopExample.java b/maven/jp4da/jp4da-desktop/src/main/java/com/io7m/examples/jp4da/DesktopExample.java new file mode 100644 index 0000000..d7df081 --- /dev/null +++ b/maven/jp4da/jp4da-desktop/src/main/java/com/io7m/examples/jp4da/DesktopExample.java @@ -0,0 +1,56 @@ +package com.io7m.examples.jp4da; + +import javax.media.opengl.GLCapabilities; +import javax.media.opengl.GLEventListener; +import javax.media.opengl.GLProfile; + +import com.jogamp.newt.opengl.GLWindow; +import com.jogamp.opengl.util.FPSAnimator; + +public class DesktopExample implements Runnable +{ + public static void main( + final String args[]) + { + final DesktopExample de = new DesktopExample(new Example()); + de.run(); + } + + private final GLWindow window; + private final FPSAnimator animator; + + private DesktopExample( + final GLEventListener gle) + { + final GLProfile pro = GLProfile.get(GLProfile.GL2GL3); + final GLCapabilities cap = new GLCapabilities(pro); + + this.window = GLWindow.create(cap); + this.window.setSize(640, 480); + this.window.setTitle("Test1"); + this.window.addGLEventListener(gle); + this.window.setVisible(true); + + this.animator = new FPSAnimator(60); + this.animator.setUpdateFPSFrames(60, System.err); + this.animator.add(this.window); + this.animator.start(); + } + + @Override public void run() + { + try { + while (this.animator.isAnimating() && this.window.isVisible()) { + Thread.sleep(100); + } + + this.animator.stop(); + this.window.destroy(); + + System.err.println("Exiting..."); + } catch (final InterruptedException e) { + e.printStackTrace(); + System.exit(1); + } + } +} diff --git a/maven/jp4da/pom.xml b/maven/jp4da/pom.xml new file mode 100644 index 0000000..4640a77 --- /dev/null +++ b/maven/jp4da/pom.xml @@ -0,0 +1,26 @@ + + + + 4.0.0 + com.io7m.examples.jp4da + jp4da + 1.0.0 + jp4da + Universal JOGL/Android project + pom + + + UTF-8 + UTF-8 + + + + jp4da-core + jp4da-desktop + jp4da-android + + + -- cgit v1.2.3