aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com/jogamp/opengl')
-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