summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-10-08 21:57:58 +0200
committerSven Gothel <[email protected]>2014-10-08 21:57:58 +0200
commit1d623bfc9db124414f6b64a0ce72308c7757b049 (patch)
tree182335d8f7894040482c25caca91efe00046d277 /src/test
parentd720b7b72a42d5a54c974ca43f9d20b5ed28b49c (diff)
TestLandscapeES2NewtCanvasAWT: Enforce landscape shader to be compiled/linked upfront AWT migration, since it takes a long time on Mesa/AMD
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestLandscapeES2NEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestLandscapeES2NewtCanvasAWT.java14
2 files changed, 10 insertions, 6 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestLandscapeES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestLandscapeES2NEWT.java
index d7926833c..7f2bf7881 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestLandscapeES2NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestLandscapeES2NEWT.java
@@ -152,7 +152,7 @@ public class TestLandscapeES2NEWT extends UITestCase {
runTestGL(caps);
}
- static long duration = 500; // ms
+ static long duration = 1000; // ms
public static void main(final String args[]) {
mainRun = true;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestLandscapeES2NewtCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestLandscapeES2NewtCanvasAWT.java
index 0f55813f8..5b64ce3f3 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestLandscapeES2NewtCanvasAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestLandscapeES2NewtCanvasAWT.java
@@ -62,7 +62,7 @@ import org.junit.runners.MethodSorters;
public class TestLandscapeES2NewtCanvasAWT extends UITestCase {
static DimensionImmutable wsize = new Dimension(500, 290);
- static long duration = 500; // ms
+ static long duration = 1000; // ms
static int swapInterval = 1;
static boolean shallUseOffscreenFBOLayer = false;
static boolean forceES2 = false;
@@ -78,6 +78,13 @@ public class TestLandscapeES2NewtCanvasAWT extends UITestCase {
final Screen screen = NewtFactory.createScreen(dpy, 0);
final GLWindow glWindow = GLWindow.create(screen, caps);
+ // Enforce landscape shader to be linked once,
+ // since on some platforms (Mesa/AMD) it takes a long time!
+ final LandscapeES2 demo = new LandscapeES2(swapInterval);
+ glWindow.addGLEventListener(demo);
+ glWindow.setVisible(true);
+ glWindow.display();
+
final NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow);
if ( shallUseOffscreenFBOLayer ) {
newtCanvasAWT.setShallUseOffscreenLayer(true);
@@ -91,9 +98,6 @@ public class TestLandscapeES2NewtCanvasAWT extends UITestCase {
frame.add(newtCanvasAWT);
frame.setTitle("Gears NewtCanvasAWT Test (translucent "+!caps.isBackgroundOpaque()+"), swapInterval "+swapInterval+", size "+wsize);
- final LandscapeES2 demo = new LandscapeES2(swapInterval);
- glWindow.addGLEventListener(demo);
-
final Animator animator = useAnimator ? new Animator() : null;
if( useAnimator ) {
animator.setModeBits(false, AnimatorBase.MODE_EXPECT_AWT_RENDERING_THREAD);
@@ -152,7 +156,7 @@ public class TestLandscapeES2NewtCanvasAWT extends UITestCase {
frame.dispose();
}
});
- glWindow.destroy();
+ glWindow.destroy(); // removeNotify does not destroy GLWindow
}
@Test