diff options
author | Sven Gothel <[email protected]> | 2008-11-26 18:55:31 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-11-26 18:55:31 +0000 |
commit | c05c08f676e4aadd1ff1c8b3dfbd3b76e50b6b4b (patch) | |
tree | 4f2c26ba1aaf65ca64f14b448eaf8171473a5b8c /src | |
parent | 71593624be3fc02a30772f8fe966b1ffacda1e55 (diff) |
Reflect JOGL2 NEWT changes
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@298 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src')
-rwxr-xr-x | src/demos/GLInfo.java | 16 | ||||
-rwxr-xr-x | src/demos/es1/Info.java | 14 | ||||
-rwxr-xr-x | src/demos/es1/RedSquare.java | 14 | ||||
-rwxr-xr-x | src/demos/es1/angeles/Main.java | 14 | ||||
-rw-r--r-- | src/demos/es1/cube/Cube.java | 15 | ||||
-rw-r--r-- | src/demos/es1/cube/CubeImmModeSink.java | 14 | ||||
-rwxr-xr-x | src/demos/es1/cubefbo/Main.java | 14 | ||||
-rwxr-xr-x | src/demos/es2/RedSquare.java | 14 | ||||
-rwxr-xr-x | src/demos/es2/perftst/Perftst.java | 14 | ||||
-rw-r--r-- | src/jbullet/src/javabullet/demos/opengl/JOGL.java | 14 |
10 files changed, 72 insertions, 71 deletions
diff --git a/src/demos/GLInfo.java b/src/demos/GLInfo.java index 2e5eb1a..02b3fa4 100755 --- a/src/demos/GLInfo.java +++ b/src/demos/GLInfo.java @@ -17,14 +17,6 @@ public class GLInfo implements GLEventListener { System.err.println("GLInfo.run()"); GLProfile.setProfileGLAny(); try { - Window nWindow = null; - if(0!=(type&USE_AWT)) { - Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display - Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 - nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, 0); // dummy VisualID - //nWindow.setVisible(true); - } - GLCapabilities caps = new GLCapabilities(); // For emulation library, use 16 bpp caps.setRedBits(5); @@ -32,6 +24,14 @@ public class GLInfo implements GLEventListener { caps.setBlueBits(5); caps.setDepthBits(16); System.err.println("GLCapabilities PRE : "+caps); + + Window nWindow = null; + if(0!=(type&USE_AWT)) { + Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display + Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 + nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, caps); + //nWindow.setVisible(true); + } window = GLWindow.create(nWindow, caps); window.addGLEventListener(this); diff --git a/src/demos/es1/Info.java b/src/demos/es1/Info.java index 188ca7f..527c6f1 100755 --- a/src/demos/es1/Info.java +++ b/src/demos/es1/Info.java @@ -17,19 +17,19 @@ public class Info implements GLEventListener { System.err.println("Info.run()"); GLProfile.setProfileGL2ES1(); try { - Window nWindow = null; - if(0!=(type&USE_AWT)) { - Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display - Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 - nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, 0); // dummy VisualID - } - GLCapabilities caps = new GLCapabilities(); // For emulation library, use 16 bpp caps.setRedBits(5); caps.setGreenBits(6); caps.setBlueBits(5); caps.setDepthBits(16); + + Window nWindow = null; + if(0!=(type&USE_AWT)) { + Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display + Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 + nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, caps); + } window = GLWindow.create(nWindow, caps); window.addGLEventListener(this); diff --git a/src/demos/es1/RedSquare.java b/src/demos/es1/RedSquare.java index 07031d9..f0aa540 100755 --- a/src/demos/es1/RedSquare.java +++ b/src/demos/es1/RedSquare.java @@ -43,19 +43,19 @@ public class RedSquare implements MouseListener, GLEventListener { System.err.println("RedSquare.run()"); GLProfile.setProfileGLAny(); try { - Window nWindow = null; - if(0!=(type&USE_AWT)) { - Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display - Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 - nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, 0); // dummy VisualID - } - GLCapabilities caps = new GLCapabilities(); // For emulation library, use 16 bpp caps.setRedBits(5); caps.setGreenBits(6); caps.setBlueBits(5); caps.setDepthBits(16); + + Window nWindow = null; + if(0!=(type&USE_AWT)) { + Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display + Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 + nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, caps); + } window = GLWindow.create(nWindow, caps); window.addMouseListener(this); diff --git a/src/demos/es1/angeles/Main.java b/src/demos/es1/angeles/Main.java index 1c9ea23..255dc4e 100755 --- a/src/demos/es1/angeles/Main.java +++ b/src/demos/es1/angeles/Main.java @@ -32,13 +32,6 @@ public class Main implements MouseListener { //GLProfile.setProfileGL2ES1(); GLProfile.setProfileGLAny(); try { - Window nWindow = null; - if(0!=(type&USE_AWT)) { - Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display - Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 - nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, 0); // dummy VisualID - } - // Hook this into EGL GLCapabilities caps = new GLCapabilities(); // For emulation library, use 16 bpp @@ -52,6 +45,13 @@ public class Main implements MouseListener { caps.setAlphaBits(8); */ caps.setDepthBits(16); + + Window nWindow = null; + if(0!=(type&USE_AWT)) { + Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display + Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 + nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, caps); + } window = GLWindow.create(nWindow, caps); window.addMouseListener(this); diff --git a/src/demos/es1/cube/Cube.java b/src/demos/es1/cube/Cube.java index 48e1b6b..7db30b2 100644 --- a/src/demos/es1/cube/Cube.java +++ b/src/demos/es1/cube/Cube.java @@ -300,19 +300,20 @@ public class Cube implements GLEventListener { System.err.println("Cube.run()"); GLProfile.setProfileGLAny(); try { - Window nWindow = null; - if(0!=(type&USE_AWT)) { - Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display - Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 - nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, 0); // dummy VisualID - } - GLCapabilities caps = new GLCapabilities(); // For emulation library, use 16 bpp caps.setRedBits(5); caps.setGreenBits(6); caps.setBlueBits(5); caps.setDepthBits(16); + + Window nWindow = null; + if(0!=(type&USE_AWT)) { + Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display + Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 + nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, caps); + } + GLWindow window = GLWindow.create(nWindow, caps); window.addGLEventListener(this); diff --git a/src/demos/es1/cube/CubeImmModeSink.java b/src/demos/es1/cube/CubeImmModeSink.java index c0ad4aa..a3f1570 100644 --- a/src/demos/es1/cube/CubeImmModeSink.java +++ b/src/demos/es1/cube/CubeImmModeSink.java @@ -385,19 +385,19 @@ public class CubeImmModeSink implements GLEventListener { System.err.println("CubeImmModeSink.run()"); GLProfile.setProfileGLAny(); try { - Window nWindow = null; - if(0!=(type&USE_AWT)) { - Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display - Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 - nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, 0); // dummy VisualID - } - GLCapabilities caps = new GLCapabilities(); // For emulation library, use 16 bpp caps.setRedBits(5); caps.setGreenBits(6); caps.setBlueBits(5); caps.setDepthBits(16); + + Window nWindow = null; + if(0!=(type&USE_AWT)) { + Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display + Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 + nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, caps); + } GLWindow window = GLWindow.create(nWindow, caps); window.addGLEventListener(this); diff --git a/src/demos/es1/cubefbo/Main.java b/src/demos/es1/cubefbo/Main.java index cc43ebf..c9abaf2 100755 --- a/src/demos/es1/cubefbo/Main.java +++ b/src/demos/es1/cubefbo/Main.java @@ -40,13 +40,6 @@ public class Main implements MouseListener { System.out.println("cubefbo.Main.run()"); GLProfile.setProfileGLAny(); try { - Window nWindow = null; - if(0!=(type&USE_AWT)) { - Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display - Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 - nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, 0); // dummy VisualID - } - // Hook this into EGL GLCapabilities caps = new GLCapabilities(); // For emulation library, use 16 bpp @@ -54,6 +47,13 @@ public class Main implements MouseListener { caps.setGreenBits(6); caps.setBlueBits(5); caps.setDepthBits(16); + + Window nWindow = null; + if(0!=(type&USE_AWT)) { + Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display + Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 + nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, caps); + } window = GLWindow.create(nWindow, caps); window.addMouseListener(this); diff --git a/src/demos/es2/RedSquare.java b/src/demos/es2/RedSquare.java index ce1d0c2..c649a54 100755 --- a/src/demos/es2/RedSquare.java +++ b/src/demos/es2/RedSquare.java @@ -46,19 +46,19 @@ public class RedSquare implements MouseListener, GLEventListener { System.err.println("RedSquare.run()"); GLProfile.setProfileGL2ES2(); try { - Window nWindow = null; - if(0!=(type&USE_AWT)) { - Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display - Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 - nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, 0); // dummy VisualID - } - GLCapabilities caps = new GLCapabilities(); // For emulation library, use 16 bpp caps.setRedBits(5); caps.setGreenBits(6); caps.setBlueBits(5); caps.setDepthBits(16); + + Window nWindow = null; + if(0!=(type&USE_AWT)) { + Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display + Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 + nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, caps); + } window = GLWindow.create(nWindow, caps); window.addMouseListener(this); diff --git a/src/demos/es2/perftst/Perftst.java b/src/demos/es2/perftst/Perftst.java index d40c4c4..12fa73f 100755 --- a/src/demos/es2/perftst/Perftst.java +++ b/src/demos/es2/perftst/Perftst.java @@ -42,19 +42,19 @@ public class Perftst implements MouseListener, GLEventListener { System.err.println("Perftst.run()"); GLProfile.setProfileGL2ES2(); try { - Window nWindow = null; - if(0!=(type&USE_AWT)) { - Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display - Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 - nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, 0); // dummy VisualID - } - GLCapabilities caps = new GLCapabilities(); // For emulation library, use 16 bpp caps.setRedBits(5); caps.setGreenBits(6); caps.setBlueBits(5); caps.setDepthBits(16); + + Window nWindow = null; + if(0!=(type&USE_AWT)) { + Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display + Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 + nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, caps); + } window = GLWindow.create(nWindow, caps); window.addMouseListener(this); diff --git a/src/jbullet/src/javabullet/demos/opengl/JOGL.java b/src/jbullet/src/javabullet/demos/opengl/JOGL.java index 8b3c418..5498544 100644 --- a/src/jbullet/src/javabullet/demos/opengl/JOGL.java +++ b/src/jbullet/src/javabullet/demos/opengl/JOGL.java @@ -68,19 +68,19 @@ public class JOGL implements MouseListener { System.err.println(" run()"); GLProfile.setProfileGLAny(); try { - Window nWindow = null; - if(0!=(type&USE_AWT)) { - Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display - Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 - nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, 0); // dummy VisualID - } - GLCapabilities caps = new GLCapabilities(); // For emulation library, use 16 bpp caps.setRedBits(5); caps.setGreenBits(6); caps.setBlueBits(5); caps.setDepthBits(16); + + Window nWindow = null; + if(0!=(type&USE_AWT)) { + Display nDisplay = NewtFactory.createDisplay(NewtFactory.AWT, null); // local display + Screen nScreen = NewtFactory.createScreen(NewtFactory.AWT, nDisplay, 0); // screen 0 + nWindow = NewtFactory.createWindow(NewtFactory.AWT, nScreen, caps); + } window = GLWindow.create(nWindow, caps); window.addMouseListener(this); |