Commit 99c37763 authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman 💥
Browse files

Added javaone demos

parent 4b6140e9
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>javaonedemo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
<?xml version="1.0"?>
<project name="javaonedemo" default="build" basedir=".">
<path id="compiler.class.path">
<pathelement path="../../com.syncleus.aparapi/dist/aparapi.jar"/>
<pathelement path="../third-party/jogamp/jogl-all.jar"/>
<pathelement path="../third-party/jogamp/gluegen-rt.jar"/>
</path>
<path id="runtime.class.path" cache="true">
<path refid="compiler.class.path"/>
<pathelement path="${ant.project.name}.jar"/>
</path>
<target name="build" depends="clean">
<mkdir dir="classes"/>
<javac srcdir="src" destdir="classes" debug="on" includeantruntime="false">
<classpath refid="compiler.class.path"/>
</javac>
<copy todir="classes/com/amd/aparapi/examples/javaonedemo" file="src/com/amd/aparapi/examples/javaonedemo/particle.jpg"/>
<jar jarfile="${ant.project.name}.jar" basedir="classes"/>
</target>
<target name="clean">
<delete dir="classes"/>
<delete file="${ant.project.name}.jar"/>
</target>
</project>
<?xml version="1.0"?>
<project name="nbody" default="get" basedir=".">
<property name="jogamp-jar-url" value="http://jogamp.org/deployment/archive/rc/gluegen_52-joal_32-jogl_66-jocl_41/jar"/>
<target name="get">
<!-- <get dest="jogamp">
<url url="${jogamp-jar-url}/jogl-all.jar"/>
<url url="${jogamp-jar-url}/gluegen-rt.jar"/>
</get>-->
<get dest="jogamp">
<url url="${jogamp-jar-url}/jogl-all-natives-windows-i586.jar"/>
<url url="${jogamp-jar-url}/gluegen-rt-natives-windows-i586.jar"/>
</get>
<unzip src="jogamp/jogl-all-natives-windows-i586.jar" dest="jogamp/windows-x86"/>
<unzip src="jogamp/gluegen-rt-natives-windows-i586.jar" dest="jogamp/windows-x86"/>
<delete dir="jogamp/windows-x86/META-INF"/>
<get dest="jogamp">
<url url="${jogamp-jar-url}/jogl-all-natives-windows-amd64.jar"/>
<url url="${jogamp-jar-url}/gluegen-rt-natives-windows-amd64.jar"/>
</get>
<unzip src="jogamp/jogl-all-natives-windows-amd64.jar" dest="jogamp/windows-amd64"/>
<unzip src="jogamp/gluegen-rt-natives-windows-amd64.jar" dest="jogamp/windows-amd64"/>
<delete dir="jogamp/windows-amd64/META-INF"/>
<get dest="jogamp">
<url url="${jogamp-jar-url}/jogl-all-natives-linux-i586.jar"/>
<url url="${jogamp-jar-url}/gluegen-rt-natives-linux-i586.jar"/>
</get>
<unzip src="jogamp/jogl-all-natives-linux-i586.jar" dest="jogamp/linux-i586"/>
<unzip src="jogamp/gluegen-rt-natives-linux-i586.jar" dest="jogamp/linux-i586"/>
<delete dir="jogamp/linux-i586/META-INF"/>
<get dest="jogamp">
<url url="${jogamp-jar-url}/jogl-all-natives-linux-amd64.jar"/>
<url url="${jogamp-jar-url}/gluegen-rt-natives-linux-amd64.jar"/>
</get>
<unzip src="jogamp/jogl-all-natives-linux-amd64.jar" dest="jogamp/linux-amd64"/>
<unzip src="jogamp/gluegen-rt-natives-linux-amd64.jar" dest="jogamp/linux-amd64"/>
<delete dir="jogamp/linux-amd64/META-INF"/>
<get dest="jogamp">
<url url="${jogamp-jar-url}/jogl-all-natives-macosx-universal.jar"/>
<url url="${jogamp-jar-url}/gluegen-rt-natives-macosx-universal.jar"/>
</get>
<unzip src="jogamp/jogl-all-natives-macosx-universal.jar" dest="jogamp/macosx-universal"/>
<unzip src="jogamp/gluegen-rt-natives-macosx-universal.jar" dest="jogamp/macosx-universal"/>
<delete dir="jogamp/macosx-universal/META-INF"/>
</target>
</project>
@echo off
java ^
-Djava.library.path=../../com.syncleus.aparapi.jni/dist ^
-classpath ../../com.syncleus.aparapi/dist/aparapi.jar;javaonedemo.jar ^
com.syncleus.aparapi.examples.javaonedemo.Life
#!/bin/bash
java \
-Djava.library.path=../../com.syncleus.aparapi.jni/dist \
-classpath ../../com.syncleus.aparapi/dist/aparapi.jar:javaonedemo.jar \
com.syncleus.aparapi.examples.javaonedemo.Life
@echo off
java ^
-Djava.library.path=../../com.syncleus.aparapi.jni/dist ^
-classpath ../../com.syncleus.aparapi/dist/aparapi.jar;javaonedemo.jar ^
com.syncleus.aparapi.examples.javaonedemo.Mandel
#!/bin/bash
java \
-Djava.library.path=../../com.syncleus.aparapi.jni/dist \
-classpath ../../com.syncleus.aparapi/dist/aparapi.jar:javaonedemo.jar \
com.syncleus.aparapi.examples.javaonedemo.Mandel
@echo off
java ^
-Djava.library.path=..\..\com.syncleus.aparapi.jni\dist;..\third-party\jogamp\windows-%PROCESSOR_ARCHITECTURE% ^
-classpath ..\third-party\jogamp\gluegen-rt.jar;..\third-party\jogamp\jogl-all.jar;..\..\com.syncleus.aparapi\dist\aparapi.jar;javaonedemo.jar ^
com.syncleus.aparapi.examples.javaonedemo.NBody
#!/bin/bash
java -Djava.library.path=../../com.syncleus.aparapi.jni/dist:../third-party/jogamp \
-classpath ../third-party/jogamp/gluegen-rt.jar:../third-party/jogamp/jogl-all.jar:../../com.syncleus.aparapi/dist/aparapi.jar:javaonedemo.jar \
com.syncleus.aparapi.examples.javaonedemo.NBody
......@@ -83,6 +83,16 @@
<artifactId>aparapi</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
<build>
......
......@@ -24,24 +24,27 @@ public class All {
System.out.println(" 7) Blacksholes");
System.out.println(" 8) Squares");
System.out.println(" 9) Multipass swing worker");
System.out.println(" 10) Progress and cancel demo");
System.out.println(" 11) Info");
System.out.println(" 12) Medians");
System.out.println(" 13) MDArray");
System.out.println(" 14) Add");
System.out.println(" 15) Extension - FFT");
System.out.println(" 16) Extension - Histogram");
System.out.println(" 17) Extension - Histogram Ideal");
System.out.println(" 18) Extension - Mandel");
System.out.println(" 19) Extension - Square");
System.out.println(" 20) Configuration - Auto cleanup arrays");
System.out.println(" 21) Configuration - Cleanup arrays");
System.out.println(" 22) Configuration - Configuration");
System.out.println(" 23) Configuration - Custom Configuration");
System.out.println(" 24) Configuration - Legacy Configuration");
System.out.println(" 25) Configuration - Profiling");
System.out.println(" 26) Configuration - Profiling (no binary)");
System.out.println(" 27) Effects");
System.out.println(" 10) Progress and cancel demo");
System.out.println(" 11) Info");
System.out.println(" 12) Medians");
System.out.println(" 13) MDArray");
System.out.println(" 14) Add");
System.out.println(" 15) Extension - FFT");
System.out.println(" 16) Extension - Histogram");
System.out.println(" 17) Extension - Histogram Ideal");
System.out.println(" 18) Extension - Mandel");
System.out.println(" 19) Extension - Square");
System.out.println(" 20) Configuration - Auto cleanup arrays");
System.out.println(" 21) Configuration - Cleanup arrays");
System.out.println(" 22) Configuration - Configuration");
System.out.println(" 23) Configuration - Custom Configuration");
System.out.println(" 24) Configuration - Legacy Configuration");
System.out.println(" 25) Configuration - Profiling");
System.out.println(" 26) Configuration - Profiling (no binary)");
System.out.println(" 27) Effects");
System.out.println(" 28) Javaone - Game of Life");
System.out.println(" 29) Javaone - Mandlebrot");
System.out.println(" 30) Javaone - NBody");
System.out.println();
Scanner in = new Scanner(System.in);
......@@ -153,6 +156,15 @@ public class All {
case "27":
com.syncleus.aparapi.examples.effects.Main.main(args);
break;
case "28":
com.syncleus.aparapi.examples.javaonedemo.Life.main(args);
break;
case "29":
com.syncleus.aparapi.examples.javaonedemo.Mandel.main(args);
break;
case "30":
com.syncleus.aparapi.examples.javaonedemo.NBody.main(args);
break;
default:
System.out.println("Invalid selection.");
}
......
/**
* This product currently only contains code developed by authors
* of specific components, as identified by the source code files.
*
* Since product implements StAX API, it has dependencies to StAX API
* classes.
*
* For additional credits (generally to people who reported problems)
* see CREDITS file.
*/
/*
Copyright (c) 2010-2011, Advanced Micro Devices, Inc.
All rights reserved.
......
/**
* This product currently only contains code developed by authors
* of specific components, as identified by the source code files.
*
* Since product implements StAX API, it has dependencies to StAX API
* classes.
*
* For additional credits (generally to people who reported problems)
* see CREDITS file.
*/
/*
Copyright (c) 2010-2011, Advanced Micro Devices, Inc.
All rights reserved.
......
/**
* This product currently only contains code developed by authors
* of specific components, as identified by the source code files.
*
* Since product implements StAX API, it has dependencies to StAX API
* classes.
*
* For additional credits (generally to people who reported problems)
* see CREDITS file.
*/
/*
Copyright (c) 2010-2011, Advanced Micro Devices, Inc.
All rights reserved.
......@@ -48,16 +58,16 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import javax.media.opengl.GL;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLException;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import javax.media.opengl.fixedfunc.GLLightingFunc;
import javax.media.opengl.glu.GLU;
import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL2;
import com.jogamp.opengl.GLAutoDrawable;
import com.jogamp.opengl.GLCapabilities;
import com.jogamp.opengl.GLEventListener;
import com.jogamp.opengl.GLException;
import com.jogamp.opengl.GLProfile;
import com.jogamp.opengl.awt.GLCanvas;
import com.jogamp.opengl.fixedfunc.GLLightingFunc;
import com.jogamp.opengl.glu.GLU;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment