diff options
author | Sven Gothel <[email protected]> | 2010-09-23 18:58:03 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-09-23 18:58:03 +0200 |
commit | 4bb9fed247d8151b317c32dd1f8d7bde03a1bcb6 (patch) | |
tree | dd097af09126ce7d7e7b3bf3ff0cd3132cbd80b9 /src | |
parent | 35da0bfcb126c8b296a64274dcf5b757daa723d3 (diff) |
Sync with JOGL: 1c02f0eeb539ff5de7259b822893ab63a9cc3ab0
Diffstat (limited to 'src')
-rwxr-xr-x | src/demos/GLInfo.java | 2 | ||||
-rwxr-xr-x | src/demos/GLNewtRun.java | 12 | ||||
-rwxr-xr-x | src/demos/applets/GearsApplet.java | 4 | ||||
-rwxr-xr-x | src/demos/applets/GearsJOALApplet.java | 4 | ||||
-rwxr-xr-x | src/demos/applets/JOGLNewtApplet1Run.java | 31 | ||||
-rwxr-xr-x | src/demos/applets/JOGLNewtAppletBase.java | 14 | ||||
-rwxr-xr-x | src/demos/cubefbo/Main.java | 4 | ||||
-rwxr-xr-x | src/demos/es1/Info.java | 3 | ||||
-rwxr-xr-x | src/demos/es1/RedSquare.java | 3 | ||||
-rwxr-xr-x | src/demos/es1/angeles/Main.java | 3 | ||||
-rw-r--r-- | src/demos/es1/cube/Cube.java | 3 | ||||
-rw-r--r-- | src/demos/es1/cube/CubeImmModeSink.java | 3 | ||||
-rwxr-xr-x | src/demos/es1/cubefbo/Main.java | 3 | ||||
-rwxr-xr-x | src/demos/es2/RedSquare.java | 2 | ||||
-rw-r--r-- | src/demos/es2/openmax/Cube.java | 2 | ||||
-rwxr-xr-x | src/demos/es2/perftst/Perftst.java | 2 | ||||
-rwxr-xr-x | src/demos/jrefract/JRefract.java | 5 | ||||
-rw-r--r-- | src/demos/newt/NEWTTest1.java | 4 | ||||
-rw-r--r-- | src/demos/newt/TaskManagerTest1.java | 4 | ||||
-rw-r--r-- | src/demos/newt/TaskManagerTest2.java | 2 | ||||
-rw-r--r-- | src/demos/newt/util/TaskToolWM.java | 2 | ||||
-rwxr-xr-x | src/demos/readbuffer/Main.java | 6 |
22 files changed, 59 insertions, 59 deletions
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 <applet> 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 <applet> 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 <applet> 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/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); } |