diff options
author | Sven Gothel <[email protected]> | 2013-02-21 05:59:19 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-02-21 05:59:19 +0100 |
commit | 43df6ed31d5144fb8fcdab51eae62fc123364a38 (patch) | |
tree | f80217939b98c6f7484c698b882d16a3b9743a62 /src/test/com/jogamp | |
parent | 10b4957dc36005453d2a4e7a3b4de4df20d0c901 (diff) |
TestGearsES2SWT: Fix NPE
Diffstat (limited to 'src/test/com/jogamp')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/swt/TestGearsES2SWT.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/swt/TestGearsES2SWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/swt/TestGearsES2SWT.java index 08e4ac26a..c6f299e83 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/swt/TestGearsES2SWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/swt/TestGearsES2SWT.java @@ -172,6 +172,12 @@ public class TestGearsES2SWT extends UITestCase { animator.setUpdateFPSFrames(60, showFPS ? System.err : null); + while(animator.isAnimating() && !canvas.isRealized() && animator.getTotalFPSDuration()<duration) { + if( !display.readAndDispatch() ) { + // blocks on linux .. display.sleep(); + Thread.sleep(10); + } + } System.err.println("NW chosen: "+canvas.getDelegatedDrawable().getChosenGLCapabilities()); System.err.println("GL chosen: "+canvas.getChosenGLCapabilities()); System.err.println("window pos/siz: "+canvas.getLocation()+" "+canvas.getWidth()+"x"+canvas.getHeight()); |