summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-23 05:07:51 +0100
committerSven Gothel <[email protected]>2010-11-23 05:07:51 +0100
commitae1ca3f2cae849f5e5a44538284082e861a98de1 (patch)
tree65c3c820ae0c744bc1f60393d41ffec6984a786d
parenta6076ff25bd3abd2d1e12f77dfde3f255ac67e7d (diff)
Adapt to JOGL 7262641429b542929efc699e392f410f1dee2187
-rw-r--r--java-win32-dbg.bat4
-rw-r--r--java-win32-gl2es12-dbg.bat6
-rw-r--r--java-win32.bat4
-rw-r--r--java-win64-dbg.bat25
-rw-r--r--java-win64.bat14
-rwxr-xr-xjnlp-files/HDRDebug.jnlp37
-rw-r--r--make/make.jogl.all.win32.bat4
-rw-r--r--make/make.jogl.all.win64.bat13
-rwxr-xr-xsrc/demos/GLInfo.java2
-rwxr-xr-xsrc/demos/GLNewtRun.java1
-rwxr-xr-xsrc/demos/applets/JOGLNewtApplet1Run.java2
-rwxr-xr-xsrc/demos/applets/JOGLNewtAppletBase.java4
-rwxr-xr-xsrc/demos/context/DualContext.java3
-rwxr-xr-xsrc/demos/es1/RedSquare.java4
-rwxr-xr-xsrc/demos/es2/RedSquare.java4
-rwxr-xr-xsrc/demos/misc/GLCapsTableDemo.java18
-rw-r--r--src/demos/proceduralTexturePhysics/Water.java3
17 files changed, 119 insertions, 29 deletions
diff --git a/java-win32-dbg.bat b/java-win32-dbg.bat
index 9de5f1f..bd19b64 100644
--- a/java-win32-dbg.bat
+++ b/java-win32-dbg.bat
@@ -1,6 +1,6 @@
-set J2RE_HOME=c:\jre1.6.0_20_x32
-set JAVA_HOME=c:\jdk1.6.0_20_x32
+set J2RE_HOME=c:\jre1.6.0_22_x32
+set JAVA_HOME=c:\jdk1.6.0_22_x32
set JAR_DIR=..\jogl\build-win32\jar
set LIB_DIR=..\jogl\build-win32\lib
diff --git a/java-win32-gl2es12-dbg.bat b/java-win32-gl2es12-dbg.bat
index f1942d5..3baf934 100644
--- a/java-win32-gl2es12-dbg.bat
+++ b/java-win32-gl2es12-dbg.bat
@@ -1,8 +1,6 @@
-set J2RE_HOME=c:\jre6
-set JAVA_HOME=c:\jdk6
-REM set J2RE_HOME=c:\jdk1.4.2_21
-REM set JAVA_HOME=c:\jdk1.4.2_21
+set J2RE_HOME=c:\jre1.6.0_22_x32
+set JAVA_HOME=c:\jdk1.6.0_22_x32
set JAR_DIR=jogl\lib
set LIB_DIR=jogl\lib
diff --git a/java-win32.bat b/java-win32.bat
index c9dc916..1e92a89 100644
--- a/java-win32.bat
+++ b/java-win32.bat
@@ -1,6 +1,6 @@
-set J2RE_HOME=c:\jre1.6.0_20_x32
-set JAVA_HOME=c:\jdk1.6.0_20_x32
+set J2RE_HOME=c:\jre1.6.0_22_x32
+set JAVA_HOME=c:\jdk1.6.0_22_x32
set JAR_DIR=..\jogl\build-win32\jar
set LIB_DIR=..\jogl\build-win32\lib
diff --git a/java-win64-dbg.bat b/java-win64-dbg.bat
new file mode 100644
index 0000000..f5ef8f2
--- /dev/null
+++ b/java-win64-dbg.bat
@@ -0,0 +1,25 @@
+
+set J2RE_HOME=c:\jre1.6.0_22_x64
+set JAVA_HOME=c:\jdk1.6.0_22_x64
+
+set JAR_DIR=..\jogl\build-win64\jar
+set LIB_DIR=..\jogl\build-win64\lib
+
+set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\nativewindow.all.jar;%JAR_DIR%\newt.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win64\jogl-demos.jar;build-win64\jogl-demos-util.jar;build-win64\jogl-demos-data.jar
+
+echo CP_ALL %CP_ALL%
+
+REM "-Djogamp.debug.ProcAddressHelper=true"
+REM "-Djogamp.debug.NativeLibrary=true"
+REM "-Dnativewindow.debug=all"
+REM "-Djogl.debug=all"
+REM "-Dnewt.debug=all"
+
+set D_ARGS="-Djogamp.debug.JNILibLoader=true" "-Djogamp.debug.NativeLibrary=true" "-Djogamp.debug.NativeLibrary.Lookup=true" "-Djogl.debug.GLProfile=true"
+REM D_ARGS="-Djogl.debug=all -Dnewt.debug=all -Dnativewindow.debug=all"
+
+set X_ARGS="-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true"
+
+%J2RE_HOME%\bin\java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" %D_ARGS% %X_ARGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 > java-win64-dbg.log 2>&1
+
+
diff --git a/java-win64.bat b/java-win64.bat
new file mode 100644
index 0000000..45f1d73
--- /dev/null
+++ b/java-win64.bat
@@ -0,0 +1,14 @@
+
+set J2RE_HOME=c:\jre1.6.0_22_x64
+set JAVA_HOME=c:\jdk1.6.0_22_x64
+
+set JAR_DIR=..\jogl\build-win64\jar
+set LIB_DIR=..\jogl\build-win64\lib
+
+set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\nativewindow.all.jar;%JAR_DIR%\newt.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win64\jogl-demos.jar;build-win64\jogl-demos-util.jar;build-win64\jogl-demos-data.jar
+
+echo CP_ALL %CP_ALL%
+
+%J2RE_HOME%\bin\java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" "-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true" %1 %2 %3 %4 %5 %6 %7 %8 %9 > java-win64.log 2>&1
+
+
diff --git a/jnlp-files/HDRDebug.jnlp b/jnlp-files/HDRDebug.jnlp
new file mode 100755
index 0000000..1f93b65
--- /dev/null
+++ b/jnlp-files/HDRDebug.jnlp
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="DEMO_CODEBASE_TAG"
+ href="HDR.jnlp">
+ <information>
+ <title>JOGL High Dynamic Range Rendering Demo</title>
+ <vendor>JogAmp Community</vendor>
+ <homepage href="http://jogamp.org/jogl-demos/"/>
+ <description>High Dynamic Range Rendering Demo</description>
+ <description kind="short">NVidia's High Dynamic Range (HDR) rendering demo ported to Java and JOGL.</description>
+ <offline-allowed/>
+ </information>
+ <update check="background" policy="always"/>
+
+ <resources>
+ <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
+ <property name="sun.java2d.noddraw" value="true"/>
+ <property name="jnlp.gluegen.debug.NativeLibrary" value="true"/>
+ <property name="jnlp.nativewindow.debug" value="all"/>
+ <property name="jnlp.nativewindow.TraceLock" value="true"/>
+ <property name="jnlp.jogl.debug" value="GLDrawable"/>
+ <property name="jnlp.newt.debug" value="all"/>
+ <jar href="jogl-demos.jar" main="true"/>
+ <jar href="jogl-demos-util.jar" />
+ <jar href="jogl-demos-data.jar" />
+ <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" />
+ </resources>
+
+ <application-desc main-class="demos.hdr.HDR">
+ <argument>demos/data/images/stpeters_cross.hdr</argument>
+ <argument>512</argument>
+ <argument>384</argument>
+ <argument>2</argument>
+ <argument>7</argument>
+ <argument>3</argument>
+ <argument>demos/data/models/teapot.obj</argument>
+ </application-desc>
+</jnlp>
diff --git a/make/make.jogl.all.win32.bat b/make/make.jogl.all.win32.bat
index 3165ba5..ba37559 100644
--- a/make/make.jogl.all.win32.bat
+++ b/make/make.jogl.all.win32.bat
@@ -1,7 +1,7 @@
set THISDIR="C:\JOGL"
-set J2RE_HOME=c:\jre1.6.0_20_x32
-set JAVA_HOME=c:\jdk1.6.0_20_x32
+set J2RE_HOME=c:\jre1.6.0_22_x32
+set JAVA_HOME=c:\jdk1.6.0_22_x32
set ANT_PATH=C:\apache-ant-1.8.0
set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
diff --git a/make/make.jogl.all.win64.bat b/make/make.jogl.all.win64.bat
new file mode 100644
index 0000000..3ffc828
--- /dev/null
+++ b/make/make.jogl.all.win64.bat
@@ -0,0 +1,13 @@
+set THISDIR="C:\JOGL"
+
+set J2RE_HOME=c:\jre1.6.0_22_x64
+set JAVA_HOME=c:\jdk1.6.0_22_x64
+set ANT_PATH=C:\apache-ant-1.8.0
+
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw64\bin;c:\mingw\bin;%PATH%
+
+set LIB_GEN=%THISDIR%\lib
+set CLASSPATH=.;%THISDIR%\build-win64\classes
+REM -Djogl.cg=1
+
+ant -Djogl.cg=1 -Drootrel.build=build-win64 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win64.log 2>&1
diff --git a/src/demos/GLInfo.java b/src/demos/GLInfo.java
index 9cd055d..c49a578 100755
--- a/src/demos/GLInfo.java
+++ b/src/demos/GLInfo.java
@@ -82,7 +82,7 @@ public class GLInfo extends Thread implements GLEventListener {
window.display();
// Shut things down cooperatively
- window.destroy(true);
+ window.destroy();
System.out.println(glp+" GLInfo shut down cleanly.");
} catch (Throwable t) {
t.printStackTrace();
diff --git a/src/demos/GLNewtRun.java b/src/demos/GLNewtRun.java
index 40e5e1a..5310a93 100755
--- a/src/demos/GLNewtRun.java
+++ b/src/demos/GLNewtRun.java
@@ -217,7 +217,6 @@ public class GLNewtRun extends WindowAdapter implements KeyListener, MouseListen
}
}
nWindow.setUndecorated(undecorated);
- nWindow.getScreen().setDestroyWhenUnused(true);
window = GLWindow.create(nWindow);
if(!setField(demo, "window", window)) {
diff --git a/src/demos/applets/JOGLNewtApplet1Run.java b/src/demos/applets/JOGLNewtApplet1Run.java
index 936e7b9..0a5311b 100755
--- a/src/demos/applets/JOGLNewtApplet1Run.java
+++ b/src/demos/applets/JOGLNewtApplet1Run.java
@@ -86,7 +86,7 @@ public class JOGLNewtApplet1Run extends Applet {
glWindow.setVisible(false); // hide 1st
glWindow.reparentWindow(null); // get out of newtCanvasAWT
this.remove(newtCanvasAWT); // remove newtCanvasAWT
- base.destroy(true); // destroy glWindow unrecoverable
+ base.destroy(); // destroy glWindow unrecoverable
base=null;
}
}
diff --git a/src/demos/applets/JOGLNewtAppletBase.java b/src/demos/applets/JOGLNewtAppletBase.java
index da8565c..9fa1bdc 100755
--- a/src/demos/applets/JOGLNewtAppletBase.java
+++ b/src/demos/applets/JOGLNewtAppletBase.java
@@ -152,7 +152,7 @@ public class JOGLNewtAppletBase extends WindowAdapter implements KeyListener, Mo
}
}
- public void destroy(boolean unrecoverable) {
+ public void destroy() {
isValid = false;
if(null!=glAnimator) {
glAnimator.stop();
@@ -160,7 +160,7 @@ public class JOGLNewtAppletBase extends WindowAdapter implements KeyListener, Mo
glAnimator=null;
}
if(null!=glWindow) {
- glWindow.destroy(unrecoverable);
+ glWindow.destroy();
glWindow=null;
}
}
diff --git a/src/demos/context/DualContext.java b/src/demos/context/DualContext.java
index d77c49a..562b1fd 100755
--- a/src/demos/context/DualContext.java
+++ b/src/demos/context/DualContext.java
@@ -145,8 +145,9 @@ public class DualContext extends Canvas {
GLProfile glp = GLProfile.getDefault(); // warm up ..
AWTGraphicsScreen screen = (AWTGraphicsScreen)AWTGraphicsScreen.createDefault();
+ GLCapabilities caps = new GLCapabilities(glp);
AWTGraphicsConfiguration config = (AWTGraphicsConfiguration)
- GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).chooseGraphicsConfiguration(new GLCapabilities(glp), null, screen);
+ GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).chooseGraphicsConfiguration(caps, caps, null, screen);
final DualContext dc = new DualContext(config);
frame.getContentPane().add(dc, BorderLayout.CENTER);
diff --git a/src/demos/es1/RedSquare.java b/src/demos/es1/RedSquare.java
index 4c3d299..a0faf9b 100755
--- a/src/demos/es1/RedSquare.java
+++ b/src/demos/es1/RedSquare.java
@@ -173,10 +173,10 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
try {
System.out.println("SHUTDOWN "+Thread.currentThread()+" START");
// Shut things down cooperatively
- window.destroy(true);
+ window.destroy();
window = null;
if(null!=nWindow) {
- nWindow.destroy(true);
+ nWindow.destroy();
nWindow=null;
}
System.out.println("SHUTDOWN "+Thread.currentThread()+" FIN");
diff --git a/src/demos/es2/RedSquare.java b/src/demos/es2/RedSquare.java
index ec126db..54c44eb 100755
--- a/src/demos/es2/RedSquare.java
+++ b/src/demos/es2/RedSquare.java
@@ -146,10 +146,10 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
public void shutdown() {
try {
// Shut things down cooperatively
- window.destroy(true);
+ window.destroy();
window = null;
if(null!=nWindow) {
- nWindow.destroy(true);
+ nWindow.destroy();
nWindow=null;
}
System.out.println("SHUTDOWN "+Thread.currentThread()+" cleanly");
diff --git a/src/demos/misc/GLCapsTableDemo.java b/src/demos/misc/GLCapsTableDemo.java
index 701712c..abfef88 100755
--- a/src/demos/misc/GLCapsTableDemo.java
+++ b/src/demos/misc/GLCapsTableDemo.java
@@ -20,6 +20,8 @@ import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLCapabilitiesChooser;
import javax.media.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.FPSAnimator;
+import javax.media.nativewindow.CapabilitiesImmutable;
+import javax.media.opengl.GLCapabilitiesImmutable;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
@@ -68,17 +70,17 @@ public class GLCapsTableDemo
private DefaultGLCapabilitiesChooser choiceExaminer = //
new DefaultGLCapabilitiesChooser()
{
- public int chooseCapabilities(Capabilities _desired,
- Capabilities[] _available,
+ public int chooseCapabilities(CapabilitiesImmutable _desired,
+ CapabilitiesImmutable[] _available,
int windowSystemRecommendedChoice)
{
- GLCapabilities desired = (GLCapabilities) _desired;
- GLCapabilities[] available = (GLCapabilities[]) _available;
+ GLCapabilitiesImmutable desired = (GLCapabilitiesImmutable) _desired;
+ GLCapabilitiesImmutable[] available = (GLCapabilitiesImmutable[]) _available;
if ( available != null )
for (int i = 0; i < available.length; i++) {
- GLCapabilities c = available[i];
+ GLCapabilitiesImmutable c = available[i];
if (c != null) {
- GLCapsTableDemo.this.available.add((GLCapabilities) c.clone());
+ GLCapsTableDemo.this.available.add((GLCapabilities) c.cloneMutable());
GLCapsTableDemo.this.indices.add(new Integer(i));
}
}
@@ -130,8 +132,8 @@ public class GLCapsTableDemo
* @see javax.media.opengl.GLCapabilitiesChooser#chooseCapabilities(javax.media.nativewindow.Capabilities,
* javax.media.nativewindow.Capabilities[], int)
*/
- public int chooseCapabilities(Capabilities desired,
- Capabilities[] available,
+ public int chooseCapabilities(CapabilitiesImmutable desired,
+ CapabilitiesImmutable[] available,
int windowSystemRecommendedChoice)
{
int row = capsTable.getSelectedRow();
diff --git a/src/demos/proceduralTexturePhysics/Water.java b/src/demos/proceduralTexturePhysics/Water.java
index 593c2f0..1710ef4 100644
--- a/src/demos/proceduralTexturePhysics/Water.java
+++ b/src/demos/proceduralTexturePhysics/Water.java
@@ -49,6 +49,7 @@ import javax.media.opengl.GL;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLCapabilitiesImmutable;
import javax.media.opengl.GLDrawableFactory;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLException;
@@ -203,7 +204,7 @@ public class Water {
String cubeMapFilenamePrefix,
String cubeMapFilenameSuffix,
GLAutoDrawable parentWindow) {
- GLCapabilities caps = parentWindow.getChosenGLCapabilities();
+ GLCapabilities caps = (GLCapabilities) parentWindow.getChosenGLCapabilities().cloneMutable();
loadInitialTexture(caps.getGLProfile(), initialMapFilename);
tmpSpinFilename = spinFilename;