diff options
Diffstat (limited to 'src/demos/es2/RedSquare.java')
-rwxr-xr-x | src/demos/es2/RedSquare.java | 14 |
1 files changed, 7 insertions, 7 deletions
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); |