summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xjava-dbg-noawt.sh3
-rw-r--r--make/build.xml2
-rw-r--r--nbproject/ide-file-targets.xml17
-rw-r--r--nbproject/project.xml15
-rwxr-xr-xsrc/demos/GLInfo.java2
-rwxr-xr-xsrc/demos/GLNewtRun.java12
-rwxr-xr-xsrc/demos/applets/GearsApplet.java4
-rwxr-xr-xsrc/demos/applets/GearsJOALApplet.java4
-rwxr-xr-xsrc/demos/applets/JOGLNewtApplet1Run.java31
-rwxr-xr-xsrc/demos/applets/JOGLNewtAppletBase.java14
-rwxr-xr-xsrc/demos/cubefbo/Main.java4
-rwxr-xr-xsrc/demos/es1/Info.java3
-rwxr-xr-xsrc/demos/es1/RedSquare.java3
-rwxr-xr-xsrc/demos/es1/angeles/Main.java3
-rw-r--r--src/demos/es1/cube/Cube.java3
-rw-r--r--src/demos/es1/cube/CubeImmModeSink.java3
-rwxr-xr-xsrc/demos/es1/cubefbo/Main.java3
-rwxr-xr-xsrc/demos/es2/RedSquare.java2
-rw-r--r--src/demos/es2/openmax/Cube.java2
-rwxr-xr-xsrc/demos/es2/perftst/Perftst.java2
-rwxr-xr-xsrc/demos/jrefract/JRefract.java5
-rwxr-xr-xsrc/demos/misc/Picking.java4
-rw-r--r--src/demos/newt/NEWTTest1.java4
-rw-r--r--src/demos/newt/TaskManagerTest1.java4
-rw-r--r--src/demos/newt/TaskManagerTest2.java2
-rw-r--r--src/demos/newt/util/TaskToolWM.java2
-rwxr-xr-xsrc/demos/readbuffer/Main.java6
27 files changed, 96 insertions, 63 deletions
diff --git a/java-dbg-noawt.sh b/java-dbg-noawt.sh
index 8c2f203..5f4a7c1 100755
--- a/java-dbg-noawt.sh
+++ b/java-dbg-noawt.sh
@@ -15,7 +15,8 @@ if [ $CPOK -eq 0 ] ; then
echo No JOGL in CLASSPATH
else
# D_ARGS="-Djogl.verbose=true -Dgluegen.debug.ProcAddressHelper=true -Dgluegen.debug.NativeLibrary=true -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all"
- D_ARGS="-Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all -Djogl.debug.GLSLState"
+ #D_ARGS="-Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all -Djogl.debug.GLSLState"
+ D_ARGS="-Dnewt.test.EDTMainThread=true -Dnewt.debug=all"
if [ $MOSX -eq 1 ] ; then
X_ARGS="-XstartOnFirstThread"
fi
diff --git a/make/build.xml b/make/build.xml
index 6bc3ebf..4f2f7b1 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -96,6 +96,7 @@
<property name="nativewindow.awt.jar" value="${jogl.root}/${rootrel.build}/nativewindow/nativewindow.awt.jar" />
<property name="newt.core.jar" value="${jogl.root}/${rootrel.build}/newt/newt.core.jar" />
<property name="newt.ogl.jar" value="${jogl.root}/${rootrel.build}/newt/newt.ogl.jar" />
+ <property name="newt.awt.jar" value="${jogl.root}/${rootrel.build}/newt/newt.awt.jar" />
<property name="joal.jar" value="../lib/joal.jar" />
<property name="joal-demos.jar" value="../lib/joal-demos.jar" />
<property name="simple-xml.jar" value="../lib/simple-xml-1.1.1.jar" />
@@ -162,6 +163,7 @@
<pathelement location="${jogl.util.gldesktop.jar}" />
<pathelement location="${newt.core.jar}" />
<pathelement location="${newt.ogl.jar}" />
+ <pathelement location="${newt.awt.jar}" />
<pathelement location="${joal.jar}" />
<pathelement location="${joal-demos.jar}" />
<pathelement location="${gluegen-rt.jar}" />
diff --git a/nbproject/ide-file-targets.xml b/nbproject/ide-file-targets.xml
index f5597bc..6fd63a2 100644
--- a/nbproject/ide-file-targets.xml
+++ b/nbproject/ide-file-targets.xml
@@ -13,4 +13,21 @@
</classpath>
</java>
</target>
+ <!-- TODO: edit the following target according to your needs -->
+ <!-- (more info: http://www.netbeans.org/kb/articles/freeform-config.html#runsingle) -->
+ <target name="debug-selected-file-in-src">
+ <fail unless="debug.class">Must set property 'debug.class'</fail>
+ <path id="cp">
+ <pathelement path="../gluegen/build/gluegen-rt.jar:../jogl/build/nativewindow/nativewindow.all.jar:../jogl/build/jogl/jogl.all.jar:../jogl/build/newt/newt.all.jar:../joal/build/joal.jar"/>
+ <pathelement location="build"/>
+ </path>
+ <nbjpdastart addressproperty="jpda.address" name="jogl-demos" transport="dt_socket">
+ <classpath refid="cp"/>
+ </nbjpdastart>
+ <java classname="${debug.class}" fork="true">
+ <classpath refid="cp"/>
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+ </java>
+ </target>
</project>
diff --git a/nbproject/project.xml b/nbproject/project.xml
index ecd14b4..e688bdf 100644
--- a/nbproject/project.xml
+++ b/nbproject/project.xml
@@ -46,6 +46,19 @@
</arity>
</context>
</action>
+ <action name="debug.single">
+ <script>nbproject/ide-file-targets.xml</script>
+ <target>debug-selected-file-in-src</target>
+ <context>
+ <property>debug.class</property>
+ <folder>src</folder>
+ <pattern>\.java$</pattern>
+ <format>java-name</format>
+ <arity>
+ <one-file-only/>
+ </arity>
+ </context>
+ </action>
</ide-actions>
<export>
<type>folder</type>
@@ -75,7 +88,7 @@
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
<compilation-unit>
<package-root>src</package-root>
- <classpath mode="compile">../gluegen/build/gluegen-rt.jar:../jogl/build/jogl/jogl.all.jar:../jogl/build/nativewindow/nativewindow.all.jar:../jogl/build/newt/newt.all.jar:../joal/build/joal.jar</classpath>
+ <classpath mode="compile">../gluegen/build/gluegen-rt.jar:../jogl/build/nativewindow/nativewindow.all.jar:../jogl/build/jogl/jogl.all.jar:../jogl/build/newt/newt.all.jar:../joal/build/joal.jar</classpath>
<built-to>build</built-to>
<source-level>1.5</source-level>
</compilation-unit>
diff --git a/src/demos/GLInfo.java b/src/demos/GLInfo.java
index e1e8a67..d9c5f56 100755
--- a/src/demos/GLInfo.java
+++ b/src/demos/GLInfo.java
@@ -34,7 +34,7 @@ public class GLInfo extends Thread implements GLEventListener {
if(0!=(type&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
System.err.println(glp+" "+nWindow);
window = GLWindow.create(nWindow);
} else {
diff --git a/src/demos/GLNewtRun.java b/src/demos/GLNewtRun.java
index d3816cc..82aec19 100755
--- a/src/demos/GLNewtRun.java
+++ b/src/demos/GLNewtRun.java
@@ -199,23 +199,25 @@ public class GLNewtRun extends WindowAdapter implements KeyListener, MouseListen
menuTest.add(new java.awt.Menu("External Frame Test - Menu"));
java.awt.Frame frame = new java.awt.Frame("External Frame Test");
frame.setMenuBar(menuTest);
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, new Object[] { frame }, nScreen, caps, undecorated);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, new Object[] { frame }, nScreen, caps);
} else {
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, undecorated);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
}
} else {
Display nDisplay = NewtFactory.createDisplay(null); // local display
Screen nScreen = NewtFactory.createScreen(nDisplay, 0); // screen 0
if(parented) {
- Window parent = NewtFactory.createWindow(nScreen, caps, undecorated);
+ Window parent = NewtFactory.createWindow(nScreen, caps);
parent.setPosition(x_p, y_p);
parent.setSize(width+width/10, height+height/10);
parent.setVisible(true);
- nWindow = NewtFactory.createWindow(parent, caps, undecorated);
+ nWindow = NewtFactory.createWindow(parent, caps);
} else {
- nWindow = NewtFactory.createWindow(nScreen, caps, undecorated);
+ nWindow = NewtFactory.createWindow(nScreen, caps);
}
}
+ nWindow.setUndecorated(undecorated);
+ nWindow.getScreen().setDestroyWhenUnused(true);
window = GLWindow.create(nWindow);
if(!setField(demo, "window", window)) {
diff --git a/src/demos/applets/GearsApplet.java b/src/demos/applets/GearsApplet.java
index dd5183b..811eafe 100755
--- a/src/demos/applets/GearsApplet.java
+++ b/src/demos/applets/GearsApplet.java
@@ -5,8 +5,8 @@ import java.awt.*;
import demos.gears.Gears;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
-import com.jogamp.opengl.util.Animator;
import com.jogamp.opengl.util.FPSAnimator;
+import javax.media.opengl.GLAnimatorControl;
/** Shows how to deploy an applet using JOGL. This demo must be
referenced from a web page via an &lt;applet&gt; tag. */
@@ -15,7 +15,7 @@ public class GearsApplet extends Applet {
static {
GLProfile.initSingleton();
}
- private Animator animator;
+ private GLAnimatorControl animator;
public void init() {
setLayout(new BorderLayout());
diff --git a/src/demos/applets/GearsJOALApplet.java b/src/demos/applets/GearsJOALApplet.java
index 54ee99f..bf36e1b 100755
--- a/src/demos/applets/GearsJOALApplet.java
+++ b/src/demos/applets/GearsJOALApplet.java
@@ -6,11 +6,11 @@ import java.awt.EventQueue;
import java.awt.GridLayout;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
-import com.jogamp.opengl.util.Animator;
import com.jogamp.opengl.util.FPSAnimator;
import javax.swing.JPanel;
import net.java.games.joal.util.ALut;
import demos.devmaster.lesson1.SingleStaticSource;
+import javax.media.opengl.GLAnimatorControl;
/** Shows how to deploy an applet using both JOGL and JOAL. This demo
must be referenced from a web page via an &lt;applet&gt; tag. */
@@ -19,7 +19,7 @@ public class GearsJOALApplet extends Applet {
static {
GLProfile.initSingleton();
}
- private Animator animator;
+ private GLAnimatorControl animator;
public void init() {
setLayout(new GridLayout(1, 2));
diff --git a/src/demos/applets/JOGLNewtApplet1Run.java b/src/demos/applets/JOGLNewtApplet1Run.java
index 0490120..df42da6 100755
--- a/src/demos/applets/JOGLNewtApplet1Run.java
+++ b/src/demos/applets/JOGLNewtApplet1Run.java
@@ -7,15 +7,17 @@ import java.awt.event.MouseMotionListener;
import java.awt.event.KeyListener;
import javax.media.opengl.*;
-import javax.media.nativewindow.*;
-import com.jogamp.newt.*;
+import com.jogamp.newt.awt.NewtCanvasAWT;
+import com.jogamp.newt.opengl.GLWindow;
+import java.awt.BorderLayout;
/** Shows how to deploy an applet using JOGL. This demo must be
referenced from a web page via an &lt;applet&gt; tag. */
public class JOGLNewtApplet1Run extends Applet {
+ GLWindow glWindow;
+ NewtCanvasAWT newtCanvasAWT;
JOGLNewtAppletBase base;
- Window nWindow = null;
public void init() {
if(!(this instanceof Container)) {
@@ -48,15 +50,11 @@ public class JOGLNewtApplet1Run extends Applet {
try {
GLCapabilities caps = new GLCapabilities(GLProfile.get(glProfileName));
- Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
- Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, new Object[] { container },
- nScreen, caps, true /* undecorated */);
- // nWindow.setPosition(x, y);
- // nWindow.setSize(container.getWidth(), container.getHeight());
- if(null!=nWindow) {
- base.init(nWindow);
- }
+ glWindow = GLWindow.create(caps);
+ newtCanvasAWT = new NewtCanvasAWT(glWindow);
+ container.setLayout(new BorderLayout());
+ container.add(newtCanvasAWT, BorderLayout.CENTER);
+ base.init(glWindow);
if(base.isValid()) {
GLEventListener glEventListener = base.getGLEventListener();
@@ -84,12 +82,11 @@ public class JOGLNewtApplet1Run extends Applet {
}
public void destroy() {
- base.destroy(false); // no dispose events
+ glWindow.setVisible(false); // hide 1st
+ glWindow.reparentWindow(null); // get out of newtCanvasAWT
+ this.remove(newtCanvasAWT); // remove newtCanvasAWT
+ base.destroy(true); // destroy glWindow unrecoverable
base=null;
- if(null!=nWindow) {
- nWindow.destroy();
- nWindow=null;
- }
}
}
diff --git a/src/demos/applets/JOGLNewtAppletBase.java b/src/demos/applets/JOGLNewtAppletBase.java
index 4b7377d..e07f34f 100755
--- a/src/demos/applets/JOGLNewtAppletBase.java
+++ b/src/demos/applets/JOGLNewtAppletBase.java
@@ -2,7 +2,6 @@ package demos.applets;
import java.lang.reflect.*;
-import com.jogamp.newt.*;
import com.jogamp.newt.event.*;
import com.jogamp.newt.opengl.GLWindow;
@@ -91,16 +90,14 @@ public class JOGLNewtAppletBase extends WindowAdapter implements KeyListener, Mo
return false;
}
- public void init(Window nWindow) {
- init(Thread.currentThread().getThreadGroup(), nWindow);
+ public void init(GLWindow glWindow) {
+ init(Thread.currentThread().getThreadGroup(), glWindow);
}
- public void init(ThreadGroup tg, Window nWindow) {
+ public void init(ThreadGroup tg, GLWindow glWindow) {
glEventListener = createInstance(glEventListenerClazzName);
try {
- glWindow = GLWindow.create(nWindow);
-
if(!setField(glEventListener, "window", glWindow)) {
setField(glEventListener, "glWindow", glWindow);
}
@@ -147,8 +144,7 @@ public class JOGLNewtAppletBase extends WindowAdapter implements KeyListener, Mo
}
}
- /** @param sendDisposeEvent should be false in a [time,reliable] critical shutdown */
- public void destroy(boolean sendDisposeEvent) {
+ public void destroy(boolean unrecoverable) {
isValid = false;
if(null!=glAnimator) {
glAnimator.stop();
@@ -156,7 +152,7 @@ public class JOGLNewtAppletBase extends WindowAdapter implements KeyListener, Mo
glAnimator=null;
}
if(null!=glWindow) {
- glWindow.destroy(sendDisposeEvent);
+ glWindow.destroy(unrecoverable);
glWindow=null;
}
}
diff --git a/src/demos/cubefbo/Main.java b/src/demos/cubefbo/Main.java
index 054aea4..fc87840 100755
--- a/src/demos/cubefbo/Main.java
+++ b/src/demos/cubefbo/Main.java
@@ -39,8 +39,8 @@ import java.awt.event.WindowEvent;
import javax.media.opengl.GLProfile;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.awt.GLCanvas;
-import com.jogamp.opengl.util.Animator;
import com.jogamp.opengl.util.FPSAnimator;
+import javax.media.opengl.GLAnimatorControl;
public class Main {
@@ -63,7 +63,7 @@ public class Main {
frame.add(canvas);
frame.setSize(800, 480);
- final Animator animator = new FPSAnimator(canvas, 60);
+ final GLAnimatorControl animator = new FPSAnimator(canvas, 60);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
// Run this on another thread than the AWT event queue to
diff --git a/src/demos/es1/Info.java b/src/demos/es1/Info.java
index 81d2f18..cc2fe86 100755
--- a/src/demos/es1/Info.java
+++ b/src/demos/es1/Info.java
@@ -26,7 +26,8 @@ public class Info implements GLEventListener {
if(0!=(type&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
+ nWindow.setUndecorated(false);
window = GLWindow.create(nWindow);
} else {
window = GLWindow.create(caps);
diff --git a/src/demos/es1/RedSquare.java b/src/demos/es1/RedSquare.java
index 5bf3d60..e121cbd 100755
--- a/src/demos/es1/RedSquare.java
+++ b/src/demos/es1/RedSquare.java
@@ -119,7 +119,8 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
if(0!=(type&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
+ nWindow.setUndecorated(false);
window = GLWindow.create(nWindow);
} else {
window = GLWindow.create(caps);
diff --git a/src/demos/es1/angeles/Main.java b/src/demos/es1/angeles/Main.java
index 7853ee3..93f54c7 100755
--- a/src/demos/es1/angeles/Main.java
+++ b/src/demos/es1/angeles/Main.java
@@ -64,7 +64,8 @@ public class Main implements WindowListener, MouseListener {
if(0!=(type&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
+ nWindow.setUndecorated(false);
window = GLWindow.create(nWindow);
} else {
window = GLWindow.create(caps);
diff --git a/src/demos/es1/cube/Cube.java b/src/demos/es1/cube/Cube.java
index 4717b2d..430e475 100644
--- a/src/demos/es1/cube/Cube.java
+++ b/src/demos/es1/cube/Cube.java
@@ -329,7 +329,8 @@ public class Cube implements GLEventListener {
if(0!=(type&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
+ nWindow.setUndecorated(false);
window = GLWindow.create(nWindow);
} else {
window = GLWindow.create(caps);
diff --git a/src/demos/es1/cube/CubeImmModeSink.java b/src/demos/es1/cube/CubeImmModeSink.java
index beda590..279a19b 100644
--- a/src/demos/es1/cube/CubeImmModeSink.java
+++ b/src/demos/es1/cube/CubeImmModeSink.java
@@ -394,7 +394,8 @@ public class CubeImmModeSink implements GLEventListener {
if(0!=(type&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
+ nWindow.setUndecorated(false);
window = GLWindow.create(nWindow);
} else {
window = GLWindow.create(caps);
diff --git a/src/demos/es1/cubefbo/Main.java b/src/demos/es1/cubefbo/Main.java
index 7efec18..1ff9919 100755
--- a/src/demos/es1/cubefbo/Main.java
+++ b/src/demos/es1/cubefbo/Main.java
@@ -65,7 +65,8 @@ public class Main implements WindowListener, MouseListener {
if(0!=(type&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
+ nWindow.setUndecorated(false);
window = GLWindow.create(nWindow);
} else {
window = GLWindow.create(caps);
diff --git a/src/demos/es2/RedSquare.java b/src/demos/es2/RedSquare.java
index af3567d..6606a5c 100755
--- a/src/demos/es2/RedSquare.java
+++ b/src/demos/es2/RedSquare.java
@@ -105,7 +105,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
if(0!=(type&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
window = GLWindow.create(nWindow);
} else {
window = GLWindow.create(caps);
diff --git a/src/demos/es2/openmax/Cube.java b/src/demos/es2/openmax/Cube.java
index 7cbfb9c..a6dfc53 100644
--- a/src/demos/es2/openmax/Cube.java
+++ b/src/demos/es2/openmax/Cube.java
@@ -322,7 +322,7 @@ public class Cube implements GLEventListener {
if(0!=(type&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
window = GLWindow.create(nWindow);
} else {
window = GLWindow.create(caps);
diff --git a/src/demos/es2/perftst/Perftst.java b/src/demos/es2/perftst/Perftst.java
index f739ef5..d44479e 100755
--- a/src/demos/es2/perftst/Perftst.java
+++ b/src/demos/es2/perftst/Perftst.java
@@ -55,7 +55,7 @@ public class Perftst implements MouseListener, GLEventListener {
if(0!=(type&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
+ nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
window = GLWindow.create(nWindow);
} else {
window = GLWindow.create(caps);
diff --git a/src/demos/jrefract/JRefract.java b/src/demos/jrefract/JRefract.java
index cdef67d..1eed2e5 100755
--- a/src/demos/jrefract/JRefract.java
+++ b/src/demos/jrefract/JRefract.java
@@ -33,9 +33,9 @@
package demos.jrefract;
+import com.jogamp.opengl.util.AnimatorBase;
import demos.common.Demo;
import demos.common.DemoListener;
-import demos.hdr.HDR;
import demos.hwShadowmapsSimple.HWShadowmapsSimple;
import demos.infiniteShadowVolumes.InfiniteShadowVolumes;
import demos.j2d.FlyingText;
@@ -58,7 +58,6 @@ import java.awt.event.WindowEvent;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLJPanel;
-import com.jogamp.opengl.util.Animator;
import com.jogamp.opengl.util.FPSAnimator;
import javax.swing.JCheckBox;
import javax.swing.JDesktopPane;
@@ -90,7 +89,7 @@ import javax.swing.event.InternalFrameEvent;
public class JRefract {
private boolean useRegisterCombiners;
- private Animator animator;
+ private AnimatorBase animator;
private JDesktopPane desktop;
public static void main(String[] args) {
diff --git a/src/demos/misc/Picking.java b/src/demos/misc/Picking.java
index 472ed95..5c55272 100755
--- a/src/demos/misc/Picking.java
+++ b/src/demos/misc/Picking.java
@@ -133,8 +133,8 @@ public class Picking
System.out.println("- - - - - - - - - - - -");
System.out.println(" hit: " + (i + 1));
names = buffer.get(offset); offset++;
- z1 = (float) buffer.get(offset) / 0x7fffffff; offset++;
- z2 = (float) buffer.get(offset) / 0x7fffffff; offset++;
+ z1 = (float) (buffer.get(offset)& 0xffffffffL) / 0x7fffffff; offset++;
+ z2 = (float) (buffer.get(offset)& 0xffffffffL) / 0x7fffffff; offset++;
System.out.println(" number of names: " + names);
System.out.println(" z1: " + z1);
System.out.println(" z2: " + z2);
diff --git a/src/demos/newt/NEWTTest1.java b/src/demos/newt/NEWTTest1.java
index bcfff5a..23bc914 100644
--- a/src/demos/newt/NEWTTest1.java
+++ b/src/demos/newt/NEWTTest1.java
@@ -92,7 +92,7 @@ public class NEWTTest1 implements WindowListener, KeyListener, MouseListener
Screen screen = NewtFactory.createScreen(display, 0);
Window window = NewtFactory.createWindow(screen, caps);
window.setTitle("GlassPrism");
- window.setHandleDestroyNotify(false);
+ // window.setHandleDestroyNotify(false);
window.setUndecorated(false);
window.setSize(256, 256);
window.addKeyListener(this);
@@ -105,7 +105,7 @@ public class NEWTTest1 implements WindowListener, KeyListener, MouseListener
while (running)
{
- display.pumpMessages();
+ display.dispatchMessages();
window.lockSurface();
try
diff --git a/src/demos/newt/TaskManagerTest1.java b/src/demos/newt/TaskManagerTest1.java
index 6a8f8e5..ff8ae00 100644
--- a/src/demos/newt/TaskManagerTest1.java
+++ b/src/demos/newt/TaskManagerTest1.java
@@ -97,7 +97,7 @@ public class TaskManagerTest1 implements WindowListener, KeyListener, MouseList
// do it ..
if(null!=display) {
- display.pumpMessages();
+ display.dispatchMessages();
}
} catch (Throwable t) {
// handle errors ..
@@ -145,7 +145,7 @@ public class TaskManagerTest1 implements WindowListener, KeyListener, MouseList
Screen screen = NewtFactory.createScreen(display, 0);
window = NewtFactory.createWindow(screen, caps);
window.setTitle("GlassPrism");
- window.setHandleDestroyNotify(false);
+ // window.setHandleDestroyNotify(false);
window.setUndecorated(false);
window.setSize(256, 256);
window.addKeyListener(this);
diff --git a/src/demos/newt/TaskManagerTest2.java b/src/demos/newt/TaskManagerTest2.java
index 35c707c..03fff2d 100644
--- a/src/demos/newt/TaskManagerTest2.java
+++ b/src/demos/newt/TaskManagerTest2.java
@@ -115,7 +115,7 @@ public class TaskManagerTest2 implements WindowListener, KeyListener, MouseList
Screen screen = NewtFactory.createScreen(display, 0);
Window window = NewtFactory.createWindow(screen, caps);
window.setTitle("GlassPrism");
- window.setHandleDestroyNotify(false);
+ // window.setHandleDestroyNotify(false);
window.setUndecorated(false);
window.setSize(256, 256);
window.addKeyListener(this);
diff --git a/src/demos/newt/util/TaskToolWM.java b/src/demos/newt/util/TaskToolWM.java
index 6ecdaff..4b56bf8 100644
--- a/src/demos/newt/util/TaskToolWM.java
+++ b/src/demos/newt/util/TaskToolWM.java
@@ -84,7 +84,7 @@ public class TaskToolWM {
// do it ..
if(null!=display) {
- display.pumpMessages();
+ display.dispatchMessages();
}
} catch (Throwable t) {
// handle errors ..
diff --git a/src/demos/readbuffer/Main.java b/src/demos/readbuffer/Main.java
index bf4ddde..44b665c 100755
--- a/src/demos/readbuffer/Main.java
+++ b/src/demos/readbuffer/Main.java
@@ -64,7 +64,7 @@ public class Main implements WindowListener, MouseListener, SurfaceUpdatedListen
Display nDisplay = NewtFactory.createDisplay(null); // local display
Screen nScreen = NewtFactory.createScreen(nDisplay, 0); // screen 0
- Window nWindow = NewtFactory.createWindow(nScreen, capsOffscreen, false /* undecorated */);
+ Window nWindow = NewtFactory.createWindow(nScreen, capsOffscreen);
GLWindow windowOffscreen = GLWindow.create(nWindow);
windowOffscreen.enablePerfLog(true);
@@ -96,12 +96,12 @@ public class Main implements WindowListener, MouseListener, SurfaceUpdatedListen
if(0!=(typeNewt&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- Window nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
+ Window nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
window = GLWindow.create(nWindow);
} else {
Display nDisplay = NewtFactory.createDisplay(null); // local display
Screen nScreen = NewtFactory.createScreen(nDisplay, 0); // screen 0
- Window nWindow = NewtFactory.createWindow(nScreen, caps, false /* undecorated */);
+ Window nWindow = NewtFactory.createWindow(nScreen, caps);
window = GLWindow.create(nWindow);
}