summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2012-02-28 01:03:13 +0100
committerSven Gothel <sgothel@jausoft.com>2012-02-28 01:03:13 +0100
commitf1571df02103fb48bcd4b72acc3fa44066fe7d1a (patch)
tree8c637b33c2cbcf858a1b955902a080dd92868f01
parent57f79783da6668d88b89a1479ddf42013aa5cc2e (diff)
Extract demos 'dualDepthPeeling' and 'tennis' w/ code and data. Skip www/*.7z from archive.
Extracting the demos reduces the footprint of general demo data (especially for dualDepthPeeling's dragon.obj) and also allows to run the demo as standalone (tennis).
-rw-r--r--make/build.xml40
-rw-r--r--src/demos/data/tennis/Stars.png (renamed from src/demos/data/images/Stars.png)bin28532 -> 28532 bytes
-rw-r--r--src/demos/data/tennis/TennisBottom.png (renamed from src/demos/data/images/TennisBottom.png)bin9166 -> 9166 bytes
-rw-r--r--src/demos/data/tennis/TennisEnDesk.png (renamed from src/demos/data/images/TennisEnDesk.png)bin166 -> 166 bytes
-rw-r--r--src/demos/data/tennis/TennisMyDesk.png (renamed from src/demos/data/images/TennisMyDesk.png)bin166 -> 166 bytes
-rw-r--r--src/demos/data/tennis/TennisTop.png (renamed from src/demos/data/images/TennisTop.png)bin8660 -> 8660 bytes
-rw-r--r--src/demos/tennis/Tennis.java10
7 files changed, 42 insertions, 8 deletions
diff --git a/make/build.xml b/make/build.xml
index f85bde0..0c331c1 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -3,7 +3,7 @@
- Ant build for the JOGL demos. This build has been tested with ANT 1.5.3.
-
- In order for this build to succeed the resulting jar files from this build
- - (jogl-demos.jar, jogl-demos-data.jar, jogl-demos-util.jar) must not be on
+ - (jogl-demos.jar, jogl-demos-data.jar, .., jogl-demos-util.jar) must not be on
- the CLASSPATH.
-
- This build requires that the jogl project has been checked out into a sibling
@@ -109,6 +109,8 @@
<property name="jogl.demos.jar" value="${build}/jogl-demos.jar" />
<property name="jogl.demos.util.jar" value="${build}/jogl-demos-util.jar" />
<property name="jogl.demos.data.jar" value="${build}/jogl-demos-data.jar" />
+ <property name="jogl.demos.dualDepthPeeling.jar" value="${build}/jogl-demos-dualDepthPeeling.jar" />
+ <property name="jogl.demos.tennis.jar" value="${build}/jogl-demos-tennis.jar" />
<property name="archive.name" value="jogl-demos-${jogl-demos.version}-${os.and.arch}" />
<property name="archive" value="${build}/${archive.name}" />
@@ -183,6 +185,8 @@
<fileset dir="${classes}">
<exclude name="gleem/**" />
<exclude name="demos/util/**" />
+ <exclude name="demos/dualDepthPeeling/**" />
+ <exclude name="demos/tennis/**" />
</fileset>
<fileset dir="${src}">
<include name="demos/cg/**/*.cg" />
@@ -196,7 +200,6 @@
<include name="demos/es2/perftst/shader/**" />
<include name="demos/es2/perftst/data/**" />
<include name="demos/es2/openmax/shader/**" />
- <include name="demos/dualDepthPeeling/shader/*" />
</fileset>
<!-- Avoid requiring dependence on huge jogl-demos-data.jar for
particle engine demo -->
@@ -213,6 +216,37 @@
<jar destfile="${jogl.demos.data.jar}">
<fileset dir="${src}">
<include name="demos/data/**" />
+ <exclude name="demos/data/models/dragon.obj" />
+ <exclude name="demos/data/tennis/**" />
+ </fileset>
+ <fileset dir="${classes}">
+ <include name="demos/data/**" />
+ </fileset>
+ </jar>
+ <!-- due to size or usability .. create self packaged jars (code + data) -->
+ <jar destfile="${jogl.demos.dualDepthPeeling.jar}">
+ <fileset dir="${classes}">
+ <include name="demos/dualDepthPeeling/**" />
+ </fileset>
+ <fileset dir="${src}">
+ <include name="demos/dualDepthPeeling/shader/*" />
+ </fileset>
+ <fileset dir="${src}">
+ <include name="demos/data/models/dragon.obj" />
+ </fileset>
+ <fileset dir="${classes}">
+ <include name="demos/data/**" />
+ </fileset>
+ </jar>
+ <jar destfile="${jogl.demos.tennis.jar}">
+ <fileset dir="${classes}">
+ <include name="demos/tennis/**" />
+ </fileset>
+ <!--fileset dir="${src}">
+ <include name="demos/tennis/shader/*" />
+ </fileset!-->
+ <fileset dir="${src}">
+ <include name="demos/data/tennis/**" />
</fileset>
<fileset dir="${classes}">
<include name="demos/data/**" />
@@ -309,7 +343,7 @@
</copy>
<mkdir dir="${archive}/www" />
<copy todir="${archive}/www">
- <fileset dir="${project.root}/www" includes="*" />
+ <fileset dir="${project.root}/www" includes="*" excludes="*.7z"/>
</copy>
<archive.7z destfile="${build}/${archive.name}.7z"
basedir="${build}"
diff --git a/src/demos/data/images/Stars.png b/src/demos/data/tennis/Stars.png
index 49cec37..49cec37 100644
--- a/src/demos/data/images/Stars.png
+++ b/src/demos/data/tennis/Stars.png
Binary files differ
diff --git a/src/demos/data/images/TennisBottom.png b/src/demos/data/tennis/TennisBottom.png
index d712dd6..d712dd6 100644
--- a/src/demos/data/images/TennisBottom.png
+++ b/src/demos/data/tennis/TennisBottom.png
Binary files differ
diff --git a/src/demos/data/images/TennisEnDesk.png b/src/demos/data/tennis/TennisEnDesk.png
index d9c4306..d9c4306 100644
--- a/src/demos/data/images/TennisEnDesk.png
+++ b/src/demos/data/tennis/TennisEnDesk.png
Binary files differ
diff --git a/src/demos/data/images/TennisMyDesk.png b/src/demos/data/tennis/TennisMyDesk.png
index d4a3514..d4a3514 100644
--- a/src/demos/data/images/TennisMyDesk.png
+++ b/src/demos/data/tennis/TennisMyDesk.png
Binary files differ
diff --git a/src/demos/data/images/TennisTop.png b/src/demos/data/tennis/TennisTop.png
index c014744..c014744 100644
--- a/src/demos/data/images/TennisTop.png
+++ b/src/demos/data/tennis/TennisTop.png
Binary files differ
diff --git a/src/demos/tennis/Tennis.java b/src/demos/tennis/Tennis.java
index 2460f90..1eb1b6a 100644
--- a/src/demos/tennis/Tennis.java
+++ b/src/demos/tennis/Tennis.java
@@ -159,19 +159,19 @@ public class Tennis implements GLEventListener {
//Load textures
try {
System.err.println("Loading texture...");
- texture[0] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/TennisTop.png"),
+ texture[0] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/tennis/TennisTop.png"),
false,
TextureIO.PNG);
- texture[1] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/TennisBottom.png"),
+ texture[1] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/tennis/TennisBottom.png"),
false,
TextureIO.PNG);
- texture[2] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/TennisMyDesk.png"),
+ texture[2] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/tennis/TennisMyDesk.png"),
false,
TextureIO.PNG);
- texture[3] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/TennisEnDesk.png"),
+ texture[3] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/tennis/TennisEnDesk.png"),
false,
TextureIO.PNG);
- texture[4] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/Stars.png"),
+ texture[4] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/tennis/Stars.png"),
false,
TextureIO.PNG);
System.err.println("Texture0 estimated memory size = " + texture[0].getEstimatedMemorySize());