aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-08-16 03:23:15 +0200
committerSven Gothel <[email protected]>2013-08-16 03:23:15 +0200
commitbab13046729d8283876e4d2f8855a38ff311d375 (patch)
tree602cb4a4656b0745e2b0f9940f19289ff5f34434 /src
parentc19f9916bc59765e5aaf307b8ecd5d25dfcad6b6 (diff)
Refine unit test Bug 817 c19f9916bc59765e5aaf307b8ecd5d25dfcad6b6 / Add pbuffer and fbo testing
Diffstat (limited to 'src')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestBug817GLReadBufferUtilGLCTXDefFormatTypeES2NEWT.java30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestBug817GLReadBufferUtilGLCTXDefFormatTypeES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestBug817GLReadBufferUtilGLCTXDefFormatTypeES2NEWT.java
index ab84f2232..6f0524621 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestBug817GLReadBufferUtilGLCTXDefFormatTypeES2NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestBug817GLReadBufferUtilGLCTXDefFormatTypeES2NEWT.java
@@ -60,28 +60,46 @@ public class TestBug817GLReadBufferUtilGLCTXDefFormatTypeES2NEWT extends UITestC
@Test
public void test00_RGBtoRGB() throws InterruptedException {
- testImpl(false, false);
+ testImpl(false, false, false, false);
}
@Test
public void test01_RGBtoRGBA() throws InterruptedException {
- testImpl(false, true);
+ testImpl(false, true, false, false);
}
@Test
public void test10_RGBAtoRGB() throws InterruptedException {
- testImpl(true, false);
+ testImpl(true, false, false, false);
}
@Test
public void test11_RGBAtoRGBA() throws InterruptedException {
- testImpl(true, true);
+ testImpl(true, true, false, false);
+ }
+ @Test
+ public void test21_RGBtoRGBA_pbuffer() throws InterruptedException {
+ testImpl(false, true, true, false);
+ }
+ @Test
+ public void test22_RGBtoRGBA_fbo() throws InterruptedException {
+ testImpl(false, true, false, true);
+ }
+ @Test
+ public void test31_RGBAtoRGBA_pbuffer() throws InterruptedException {
+ testImpl(true, true, true, false);
+ }
+ @Test
+ public void test32_RGBAtoRGBA_fbo() throws InterruptedException {
+ testImpl(true, true, false, true);
}
- private void testImpl(final boolean alphaCaps, final boolean readAlpha) throws InterruptedException {
+ private void testImpl(final boolean alphaCaps, final boolean readAlpha, boolean pbuffer, boolean fbo) throws InterruptedException {
final GLReadBufferUtil screenshot = new GLReadBufferUtil(readAlpha ? true : false, false);
GLProfile glp = GLProfile.getGL2ES2();
GLCapabilities caps = new GLCapabilities(glp);
- caps.setAlphaBits( alphaCaps ? 1 : 0 );
+ caps.setAlphaBits( alphaCaps ? 1 : 0 );
+ caps.setPBuffer( pbuffer );
+ caps.setFBO( fbo);
final GLWindow window = GLWindow.create(caps);
window.addGLEventListener(new GearsES2());