summaryrefslogtreecommitdiffstats
path: root/src/demos/es1/RedSquare.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos/es1/RedSquare.java')
-rwxr-xr-xsrc/demos/es1/RedSquare.java14
1 files changed, 7 insertions, 7 deletions
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);