aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-11-21 18:38:46 +0100
committerSven Gothel <[email protected]>2012-11-21 18:38:46 +0100
commit7e5371ca8eafce28c242fa7fbd8aec045fc81b71 (patch)
treea9fcaec530fec07319f8b58583d1e89ef0c17a9e /src/test
parent1f33b196d339006d132fc6adafa345913bc08f53 (diff)
OSX CALayer Stencil/.. Fix: In case of FBO CALayer usage, use default caps/pixelformat w/ chosen GLProfile only
Using a pixelformat w/ chosen stencil for CALayer does corrupt rendering for an unknown reason, probably due to incompatible pixelformat w/ CALayer composition. This patch simply discards any special chosen caps, while only recognizing the desired GLProfile for the FBO CALayer pixelformat.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java28
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryOffscrnCapsNEWT.java53
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java51
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java136
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java53
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java6
6 files changed, 280 insertions, 47 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java
index d9e9b2bf3..c5b4227c2 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java
@@ -235,20 +235,20 @@ public class TestGLAutoDrawableDelegateOnOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testGL2OnScreenDblBuf() throws InterruptedException {
+ public void testGL2OnScreenSglBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
+ reqGLCaps.setDoubleBuffered(false);
doTest(reqGLCaps, new GearsES2(1));
}
-
+
@Test
- public void testGL2OnScreenSglBuf() throws InterruptedException {
+ public void testGL2OnScreenDblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
- reqGLCaps.setDoubleBuffered(false);
doTest(reqGLCaps, new GearsES2(1));
}
-
+
@Test
public void testGL2OffScreenAutoDblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
@@ -258,21 +258,21 @@ public class TestGLAutoDrawableDelegateOnOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testGL2OffScreenFBODblBuf() throws InterruptedException {
+ public void testGL2OffScreenFBOSglBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
reqGLCaps.setFBO(true);
+ reqGLCaps.setDoubleBuffered(false);
doTest(reqGLCaps, new GearsES2(1));
}
@Test
- public void testGL2OffScreenFBOSglBuf() throws InterruptedException {
+ public void testGL2OffScreenFBODblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
reqGLCaps.setFBO(true);
- reqGLCaps.setDoubleBuffered(false);
doTest(reqGLCaps, new GearsES2(1));
}
@@ -306,17 +306,17 @@ public class TestGLAutoDrawableDelegateOnOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testES2OnScreenDblBuf() throws InterruptedException {
+ public void testES2OnScreenSglBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
if(null == reqGLCaps) return;
+ reqGLCaps.setDoubleBuffered(false);
doTest(reqGLCaps, new GearsES2(1));
}
@Test
- public void testES2OnScreenSglBuf() throws InterruptedException {
+ public void testES2OnScreenDblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
if(null == reqGLCaps) return;
- reqGLCaps.setDoubleBuffered(false);
doTest(reqGLCaps, new GearsES2(1));
}
@@ -329,21 +329,21 @@ public class TestGLAutoDrawableDelegateOnOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testES2OffScreenFBODblBuf() throws InterruptedException {
+ public void testES2OffScreenFBOSglBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
reqGLCaps.setFBO(true);
+ reqGLCaps.setDoubleBuffered(false);
doTest(reqGLCaps, new GearsES2(1));
}
@Test
- public void testES2OffScreenFBOSglBuf() throws InterruptedException {
+ public void testES2OffScreenFBODblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
reqGLCaps.setFBO(true);
- reqGLCaps.setDoubleBuffered(false);
doTest(reqGLCaps, new GearsES2(1));
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryOffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryOffscrnCapsNEWT.java
index 51f9cc411..f8092d064 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryOffscrnCapsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryOffscrnCapsNEWT.java
@@ -192,7 +192,7 @@ public class TestGLAutoDrawableFactoryOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testGL2OffScreenFBOStencil() throws InterruptedException {
+ public void testGL2OffScreenFBODblBufStencil() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
@@ -202,13 +202,25 @@ public class TestGLAutoDrawableFactoryOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testGL2OffScreenFBOStencilMSAA() throws InterruptedException {
+ public void testGL2OffScreenFBODblBufMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testGL2OffScreenFBODblBufStencilMSAA() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
reqGLCaps.setFBO(true);
reqGLCaps.setStencilBits(1);
reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
doTest(reqGLCaps, new GearsES2(1));
}
@@ -250,6 +262,16 @@ public class TestGLAutoDrawableFactoryOffscrnCapsNEWT extends UITestCase {
}
@Test
+ public void testES2OffScreenFBOSglBuf() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setDoubleBuffered(false);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
public void testES2OffScreenFBODblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
if(null == reqGLCaps) return;
@@ -259,12 +281,35 @@ public class TestGLAutoDrawableFactoryOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testES2OffScreenFBOSglBuf() throws InterruptedException {
+ public void testES2OffScreenFBODblBufStencil() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
reqGLCaps.setFBO(true);
- reqGLCaps.setDoubleBuffered(false);
+ reqGLCaps.setStencilBits(1);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testES2OffScreenFBODblBufMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testES2OffScreenFBODblBufStencilMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setStencilBits(1);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
doTest(reqGLCaps, new GearsES2(1));
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java
index a2ffa9069..0673e2f45 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java
@@ -247,76 +247,89 @@ public class TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT extends UITestCase {
}
@Test
- public void testGL2OnScreen() throws InterruptedException {
+ public void testGL2OnScreenDblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
doTest(reqGLCaps, new GearsES2(1));
}
@Test
- public void testGL2OffScreenAuto() throws InterruptedException {
+ public void testGL2OnScreenDblBufStencil() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
- reqGLCaps.setOnscreen(false);
+ reqGLCaps.setStencilBits(1);
doTest(reqGLCaps, new GearsES2(1));
}
-
+
@Test
- public void testGL2OffScreenFBOMSAA() throws InterruptedException {
+ public void testGL2OnScreenDblBufMSAA() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
- reqGLCaps.setOnscreen(false);
- reqGLCaps.setFBO(true);
reqGLCaps.setSampleBuffers(true);
reqGLCaps.setNumSamples(4);
doTest(reqGLCaps, new GearsES2(1));
}
@Test
- public void testGL2OffScreenPbuffer() throws InterruptedException {
+ public void testGL2OnScreenDblBufStencilMSAA() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
- reqGLCaps.setOnscreen(false);
- reqGLCaps.setPBuffer(true);
+ reqGLCaps.setStencilBits(1);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
doTest(reqGLCaps, new GearsES2(1));
}
@Test
- public void testES2OnScreen() throws InterruptedException {
- final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ public void testGL2OffScreenAutoDblBuf() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testGL2OffScreenFBODblBufStencil() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setStencilBits(1);
doTest(reqGLCaps, new GearsES2(1));
}
@Test
- public void testES2OffScreenAuto() throws InterruptedException {
- final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ public void testGL2OffScreenFBODblBufMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
doTest(reqGLCaps, new GearsES2(1));
}
@Test
- public void testES2OffScreenFBOMSAA() throws InterruptedException {
- final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ public void testGL2OffScreenFBODblBufStencilMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
reqGLCaps.setFBO(true);
+ reqGLCaps.setStencilBits(1);
reqGLCaps.setSampleBuffers(true);
reqGLCaps.setNumSamples(4);
doTest(reqGLCaps, new GearsES2(1));
}
@Test
- public void testES2OffScreenPbuffer() throws InterruptedException {
- final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ public void testGL2OffScreenPbuffer() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
reqGLCaps.setPBuffer(true);
doTest(reqGLCaps, new GearsES2(1));
}
-
public static void main(String args[]) throws IOException {
org.junit.runner.JUnitCore.main(TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.class.getName());
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java
index da5456777..0a6056606 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java
@@ -189,6 +189,14 @@ public class TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT extends UITestCase {
}
@Test
+ public void testGL2OnScreenSglBuf() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setDoubleBuffered(false);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
public void testGL2OnScreenDblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
@@ -196,10 +204,29 @@ public class TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testGL2OnScreenSglBuf() throws InterruptedException {
+ public void testGL2OnScreenDblBufStencil() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
- reqGLCaps.setDoubleBuffered(false);
+ reqGLCaps.setStencilBits(1);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testGL2OnScreenDblBufMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testGL2OnScreenDblBufStencilMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setStencilBits(1);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
doTest(reqGLCaps, new GearsES2(1));
}
@@ -212,6 +239,16 @@ public class TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT extends UITestCase {
}
@Test
+ public void testGL2OffScreenFBOSglBuf() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setDoubleBuffered(false);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
public void testGL2OffScreenFBODblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
@@ -221,12 +258,35 @@ public class TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testGL2OffScreenFBOSglBuf() throws InterruptedException {
+ public void testGL2OffScreenFBODblBufStencil() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
reqGLCaps.setFBO(true);
- reqGLCaps.setDoubleBuffered(false);
+ reqGLCaps.setStencilBits(1);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testGL2OffScreenFBODblBufMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testGL2OffScreenFBODblBufStencilMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setStencilBits(1);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
doTest(reqGLCaps, new GearsES2(1));
}
@@ -260,6 +320,14 @@ public class TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT extends UITestCase {
}
@Test
+ public void testES2OnScreenSglBuf() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setDoubleBuffered(false);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
public void testES2OnScreenDblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
if(null == reqGLCaps) return;
@@ -267,10 +335,29 @@ public class TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testES2OnScreenSglBuf() throws InterruptedException {
+ public void testES2OnScreenDblBufStencil() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
if(null == reqGLCaps) return;
- reqGLCaps.setDoubleBuffered(false);
+ reqGLCaps.setStencilBits(1);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testES2OnScreenDblBufMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testES2OnScreenDblBufStencilMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setStencilBits(1);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
doTest(reqGLCaps, new GearsES2(1));
}
@@ -283,6 +370,16 @@ public class TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT extends UITestCase {
}
@Test
+ public void testES2OffScreenFBOSglBuf() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setDoubleBuffered(false);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
public void testES2OffScreenFBODblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
if(null == reqGLCaps) return;
@@ -292,12 +389,35 @@ public class TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT extends UITestCase {
}
@Test
- public void testES2OffScreenFBOSglBuf() throws InterruptedException {
+ public void testES2OffScreenFBODblBufStencil() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
if(null == reqGLCaps) return;
reqGLCaps.setOnscreen(false);
reqGLCaps.setFBO(true);
- reqGLCaps.setDoubleBuffered(false);
+ reqGLCaps.setStencilBits(1);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testES2OffScreenFBODblBufMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
+ doTest(reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testES2OffScreenFBODblBufStencilMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GLES2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setOnscreen(false);
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setStencilBits(1);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
doTest(reqGLCaps, new GearsES2(1));
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java
index 37483f7e7..f4999c0fa 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java
@@ -266,18 +266,67 @@ public class TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT extends UITestCase
}
@Test
- public void testGL2OffScreenLayerAuto() throws InterruptedException {
+ public void testGL2OnScreenDblBufStencil() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setStencilBits(1);
+ doTest(false, reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testGL2OnScreenDblBufMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
+ doTest(false, reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testGL2OnScreenDblBufStencilMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setStencilBits(1);
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
+ doTest(false, reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testGL2OffScreenLayerAutoDblBuf() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
doTest(true, reqGLCaps, new GearsES2(1));
}
@Test
- public void testGL2OffScreenFBOMSAA() throws InterruptedException {
+ public void testGL2OffScreenFBODblBufStencil() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setOnscreen(true); // get native NEWT Window, not OffscreenWindow
+ reqGLCaps.setStencilBits(1);
+ doTest(true, reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testGL2OffScreenFBODblBufMSAA() throws InterruptedException {
+ final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
+ if(null == reqGLCaps) return;
+ reqGLCaps.setFBO(true);
+ reqGLCaps.setOnscreen(true); // get native NEWT Window, not OffscreenWindow
+ reqGLCaps.setSampleBuffers(true);
+ reqGLCaps.setNumSamples(4);
+ doTest(true, reqGLCaps, new GearsES2(1));
+ }
+
+ @Test
+ public void testGL2OffScreenFBODblBufStencilMSAA() throws InterruptedException {
final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2);
if(null == reqGLCaps) return;
reqGLCaps.setFBO(true);
reqGLCaps.setOnscreen(true); // get native NEWT Window, not OffscreenWindow
+ reqGLCaps.setStencilBits(1);
reqGLCaps.setSampleBuffers(true);
reqGLCaps.setNumSamples(4);
doTest(true, reqGLCaps, new GearsES2(1));
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java
index 07899b7d6..0a8063297 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java
@@ -65,6 +65,7 @@ public class TestGearsES2AWT extends UITestCase {
static boolean shallUseOffscreenLayer = false;
static boolean shallUseOffscreenPBufferLayer = false;
static boolean useMSAA = false;
+ static boolean useStencil = false;
static boolean addComp = true;
static boolean shutdownRemoveGLCanvas = true;
static boolean shutdownDisposeFrame = true;
@@ -159,6 +160,9 @@ public class TestGearsES2AWT extends UITestCase {
caps.setNumSamples(4);
caps.setSampleBuffers(true);
}
+ if(useStencil) {
+ caps.setStencilBits(1);
+ }
if(shallUseOffscreenLayer) {
caps.setOnscreen(false);
}
@@ -192,6 +196,8 @@ public class TestGearsES2AWT extends UITestCase {
shallUseOffscreenPBufferLayer = true;
} else if(args[i].equals("-msaa")) {
useMSAA = true;
+ } else if(args[i].equals("-stencil")) {
+ useStencil = true;
} else if(args[i].equals("-wait")) {
waitForKey = true;
} else if(args[i].equals("-justGears")) {