summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-06-03 23:16:29 +0000
committerSven Gothel <[email protected]>2009-06-03 23:16:29 +0000
commit00be16b0e3826a8ea7a18887eafc0d171116cb5d (patch)
treedca2301270ef05c5a9abaaa404a2565c8e70f638
parentbf12062676c11ee4df156a694a941fe85e9d828c (diff)
Move setVisible to main thread - still MacOSX buggy with multiple threads
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@340 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
-rwxr-xr-xsrc/demos/GLInfo.java4
-rwxr-xr-xsrc/demos/es1/RedSquare.java3
-rwxr-xr-xsrc/demos/es2/RedSquare.java3
3 files changed, 3 insertions, 7 deletions
diff --git a/src/demos/GLInfo.java b/src/demos/GLInfo.java
index 157860e..7e7ac6a 100755
--- a/src/demos/GLInfo.java
+++ b/src/demos/GLInfo.java
@@ -37,7 +37,6 @@ public class GLInfo extends Thread implements GLEventListener {
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
System.err.println(glp+" "+nWindow);
- //nWindow.setVisible(true);
}
window = GLWindow.create(nWindow, caps);
@@ -49,6 +48,7 @@ public class GLInfo extends Thread implements GLEventListener {
window.setSize(width, height);
// window.setFullscreen(true);
+ window.setVisible(true);
} catch (Throwable t) {
t.printStackTrace();
}
@@ -68,8 +68,6 @@ public class GLInfo extends Thread implements GLEventListener {
try {
System.err.println(glp+" GLInfo.run() 1");
- window.setVisible(true);
-
System.err.println(glp+" GLInfo.run() 2");
window.display();
diff --git a/src/demos/es1/RedSquare.java b/src/demos/es1/RedSquare.java
index 0a59101..eb36474 100755
--- a/src/demos/es1/RedSquare.java
+++ b/src/demos/es1/RedSquare.java
@@ -102,6 +102,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
// Size OpenGL to Video Surface
window.setSize(width, height);
// window.setFullscreen(true);
+ window.setVisible(true);
} catch (Throwable t) {
t.printStackTrace();
}
@@ -120,8 +121,6 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
public void run() {
System.err.println(glp+" RedSquare.run()");
try {
- window.setVisible(true);
-
do {
window.display();
} while (!quit && window.getDuration() < 20000) ;
diff --git a/src/demos/es2/RedSquare.java b/src/demos/es2/RedSquare.java
index 37ef2be..4b80c1c 100755
--- a/src/demos/es2/RedSquare.java
+++ b/src/demos/es2/RedSquare.java
@@ -79,6 +79,7 @@ public class RedSquare extends Thread implements MouseListener, GLEventListener
// Size OpenGL to Video Surface
window.setSize(width, height);
// window.setFullscreen(true);
+ window.setVisible(true);
} catch (Throwable t) {
t.printStackTrace();
}
@@ -97,8 +98,6 @@ public class RedSquare extends Thread implements MouseListener, GLEventListener
public void run() {
System.err.println(glp+" RedSquare.run()");
try {
- window.setVisible(true);
-
startTime = System.currentTimeMillis();
while (!quit && ((curTime = System.currentTimeMillis()) - startTime) < 20000) {