diff options
Diffstat (limited to 'src/demos/es1/cube')
-rw-r--r-- | src/demos/es1/cube/Cube.java | 6 | ||||
-rw-r--r-- | src/demos/es1/cube/CubeImmModeSink.java | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/demos/es1/cube/Cube.java b/src/demos/es1/cube/Cube.java index 8917697..d9c00b2 100644 --- a/src/demos/es1/cube/Cube.java +++ b/src/demos/es1/cube/Cube.java @@ -301,14 +301,16 @@ public class Cube implements GLEventListener { caps.setDepthBits(16); Window nWindow = null; + GLWindow window; 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); + window = GLWindow.create(nWindow); + } else { + window = GLWindow.create(caps); } - GLWindow window = GLWindow.create(nWindow, caps); - window.addGLEventListener(this); window.enablePerfLog(true); diff --git a/src/demos/es1/cube/CubeImmModeSink.java b/src/demos/es1/cube/CubeImmModeSink.java index b072535..cf22e90 100644 --- a/src/demos/es1/cube/CubeImmModeSink.java +++ b/src/demos/es1/cube/CubeImmModeSink.java @@ -389,12 +389,15 @@ public class CubeImmModeSink implements GLEventListener { caps.setDepthBits(16); Window nWindow = null; + GLWindow window; 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); + window = GLWindow.create(nWindow); + } else { + window = GLWindow.create(caps); } - GLWindow window = GLWindow.create(nWindow, caps); window.addGLEventListener(this); |