summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com/jogamp')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestAddRemove01GLCanvasSwingAWT.java22
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461FBOSupersamplingSwingAWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461PBufferSupersamplingSwingAWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java34
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java16
6 files changed, 39 insertions, 41 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestAddRemove01GLCanvasSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestAddRemove01GLCanvasSwingAWT.java
index c2eebbfd8..d96a49bb8 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestAddRemove01GLCanvasSwingAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestAddRemove01GLCanvasSwingAWT.java
@@ -63,20 +63,22 @@ public class TestAddRemove01GLCanvasSwingAWT extends UITestCase {
static boolean noOffscreenTest = false;
static boolean offscreenPBufferOnly = false;
static boolean offscreenFBOOnly = false;
- static GLProfile glp;
+ static GLProfile glpGL2, glpGL2ES2;
static int width, height;
static boolean waitForKey = false;
static boolean waitForKeyPost = false;
@BeforeClass
public static void initClass() {
+ width = 640;
+ height = 480;
if(GLProfile.isAvailable(GLProfile.GL2ES2)) {
- glp = GLProfile.get(GLProfile.GL2ES2);
- Assert.assertNotNull(glp);
- width = 640;
- height = 480;
- } else {
- setTestSupported(false);
+ glpGL2ES2 = GLProfile.get(GLProfile.GL2ES2);
+ Assert.assertNotNull(glpGL2ES2);
+ }
+ if(GLProfile.isAvailable(GLProfile.GL2)) {
+ glpGL2 = GLProfile.get(GLProfile.GL2);
+ Assert.assertNotNull(glpGL2);
}
}
@@ -198,7 +200,7 @@ public class TestAddRemove01GLCanvasSwingAWT extends UITestCase {
System.err.println("No onscreen test requested or platform doesn't support onscreen rendering.");
return;
}
- GLCapabilities caps = new GLCapabilities(glp);
+ GLCapabilities caps = new GLCapabilities(glpGL2ES2);
runTestGL(true, caps, addRemoveCount);
}
@@ -214,7 +216,7 @@ public class TestAddRemove01GLCanvasSwingAWT extends UITestCase {
System.err.println("Only PBuffer test is requested.");
return;
}
- GLCapabilities caps = new GLCapabilities(glp);
+ GLCapabilities caps = new GLCapabilities(glpGL2ES2);
if(offscreenPBufferOnly) {
caps.setPBuffer(true);
caps.setOnscreen(true); // simulate normal behavior ..
@@ -234,7 +236,7 @@ public class TestAddRemove01GLCanvasSwingAWT extends UITestCase {
System.err.println("Only FBO test is requested.");
return;
}
- GLCapabilities caps = new GLCapabilities(glp);
+ GLCapabilities caps = new GLCapabilities(glpGL2);
caps.setPBuffer(true);
caps.setOnscreen(true); // simulate normal behavior ..
runTestGL(false, caps, addRemoveCount);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461FBOSupersamplingSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461FBOSupersamplingSwingAWT.java
index 22c1f62dd..56e308427 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461FBOSupersamplingSwingAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461FBOSupersamplingSwingAWT.java
@@ -142,7 +142,7 @@ public class TestBug461FBOSupersamplingSwingAWT extends UITestCase implements GL
GLDrawableFactory fac = GLDrawableFactory.getFactory(glp);
Assert.assertNotNull(fac);
- Assert.assertTrue( fac.canCreateGLPbuffer(GLProfile.getDefaultDevice()) );
+ Assert.assertTrue( fac.canCreateGLPbuffer(GLProfile.getDefaultDevice(), glp) );
GLCapabilities glCap = new GLCapabilities(glp);
Assert.assertNotNull(glCap);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461PBufferSupersamplingSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461PBufferSupersamplingSwingAWT.java
index 5b7052c37..bda1a29fd 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461PBufferSupersamplingSwingAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461PBufferSupersamplingSwingAWT.java
@@ -126,7 +126,7 @@ public class TestBug461PBufferSupersamplingSwingAWT extends UITestCase implement
GLDrawableFactory fac = GLDrawableFactory.getFactory(glp);
Assert.assertNotNull(fac);
- Assert.assertTrue( fac.canCreateGLPbuffer(GLProfile.getDefaultDevice()) );
+ Assert.assertTrue( fac.canCreateGLPbuffer(GLProfile.getDefaultDevice(), glp) );
GLCapabilities glCap = new GLCapabilities(glp);
Assert.assertNotNull(glCap);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java
index 5bbd6737c..bc4ee5502 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java
@@ -72,54 +72,54 @@ public class TestMultisampleES1NEWT extends UITestCase {
@Test
public void testOnscreenMultiSampleAA0() throws InterruptedException {
- testMultiSampleAAImpl(true, 0);
+ testMultiSampleAAImpl(false, false, 0);
}
@Test
public void testOnscreenMultiSampleAA2() throws InterruptedException {
- testMultiSampleAAImpl(true, 2);
+ testMultiSampleAAImpl(false, false, 2);
}
@Test
public void testOnscreenMultiSampleAA4() throws InterruptedException {
- testMultiSampleAAImpl(true, 4);
+ testMultiSampleAAImpl(false, false, 4);
}
@Test
public void testOnscreenMultiSampleAA8() throws InterruptedException {
- testMultiSampleAAImpl(true, 8);
+ testMultiSampleAAImpl(false, false, 8);
}
@Test
- public void testOffscreenMultiSampleAA0() throws InterruptedException {
- testMultiSampleAAImpl(false, 0);
+ public void testOffscreenPBufferMultiSampleAA0() throws InterruptedException {
+ testMultiSampleAAImpl(false, true, 0);
}
@Test
- public void testOffscreenMultiSampleAA2() throws InterruptedException {
- testMultiSampleAAImpl(false, 2);
+ public void testOffsreenPBufferMultiSampleAA8() throws InterruptedException {
+ testMultiSampleAAImpl(false, true, 8);
}
@Test
- public void testOffscreenMultiSampleAA4() throws InterruptedException {
- testMultiSampleAAImpl(false, 4);
+ public void testOffscreenFBOMultiSampleAA0() throws InterruptedException {
+ testMultiSampleAAImpl(true, false, 0);
}
@Test
- public void testOffsreenMultiSampleAA8() throws InterruptedException {
- testMultiSampleAAImpl(false, 8);
+ public void testOffsreenFBOMultiSampleAA8() throws InterruptedException {
+ testMultiSampleAAImpl(true, false, 8);
}
- private void testMultiSampleAAImpl(boolean onscreen, int reqSamples) throws InterruptedException {
+ private void testMultiSampleAAImpl(boolean useFBO, boolean usePBuffer, int reqSamples) throws InterruptedException {
final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
GLProfile glp = GLProfile.getMaxFixedFunc(true);
GLCapabilities caps = new GLCapabilities(glp);
GLCapabilitiesChooser chooser = new MultisampleChooser01();
- if(!onscreen) {
- caps.setOnscreen(onscreen);
- caps.setPBuffer(true);
- }
+ caps.setAlphaBits(1);
+ caps.setFBO(useFBO);
+ caps.setPBuffer(usePBuffer);
+
if(reqSamples>0) {
caps.setSampleBuffers(true);
caps.setNumSamples(reqSamples);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java
index c2e3215ae..f3d320dff 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java
@@ -100,10 +100,6 @@ public class TestMultisampleES2NEWT extends UITestCase {
}
private void testMultiSampleAAImpl(boolean useFBO, boolean usePBuffer, int reqSamples) throws InterruptedException {
- if(useFBO) {
- System.err.println("NEWT offscreen FBO Window n/a yet");
- return;
- }
final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
GLProfile glp = GLProfile.getGL2ES2();
GLCapabilities caps = new GLCapabilities(glp);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java
index 2ed471436..f1408d38f 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java
@@ -56,7 +56,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
glpDefault = GLProfile.getDefault();
Assert.assertNotNull(glpDefault);
glDrawableFactory = GLDrawableFactory.getFactory(glpDefault);
- System.out.println("INFO: PBuffer supported: "+ glDrawableFactory.canCreateGLPbuffer(null));
+ System.out.println("INFO: PBuffer supported: "+ glDrawableFactory.canCreateGLPbuffer(null, glpDefault));
width = 640;
height = 480;
}
@@ -108,7 +108,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
@Test
public void test01aOffscreenWindowPBuffer() {
- if(!glDrawableFactory.canCreateGLPbuffer(null)) {
+ if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) {
System.out.println("WARNING: PBuffer not supported on this platform - cannot test");
return;
}
@@ -118,7 +118,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
@Test
public void test01bOffscreenWindowPBufferStencil() {
- if(!glDrawableFactory.canCreateGLPbuffer(null)) {
+ if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) {
System.out.println("WARNING: PBuffer not supported on this platform - cannot test");
return;
}
@@ -129,7 +129,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
@Test
public void test01cOffscreenWindowPBufferStencilAlpha() {
- if(!glDrawableFactory.canCreateGLPbuffer(null)) {
+ if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) {
System.out.println("WARNING: PBuffer not supported on this platform - cannot test");
return;
}
@@ -141,7 +141,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
@Test
public void test01cOffscreenWindowPBuffer555() {
- if(!glDrawableFactory.canCreateGLPbuffer(null)) {
+ if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) {
System.out.println("WARNING: PBuffer not supported on this platform - cannot test");
return;
}
@@ -154,7 +154,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
@Test
public void test02Offscreen3Windows1DisplayPBuffer() {
- if(!glDrawableFactory.canCreateGLPbuffer(null)) {
+ if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) {
System.out.println("WARNING: PBuffer not supported on this platform - cannot test");
return;
}
@@ -207,7 +207,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
@Test
public void test03Offscreen3Windows3DisplaysPBuffer() {
- if(!glDrawableFactory.canCreateGLPbuffer(null)) {
+ if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) {
System.out.println("WARNING: PBuffer not supported on this platform - cannot test");
return;
}
@@ -260,7 +260,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
@Test
public void test04OffscreenSnapshotWithDemoPBuffer() {
- if(!glDrawableFactory.canCreateGLPbuffer(null)) {
+ if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) {
System.out.println("WARNING: PBuffer not supported on this platform - cannot test");
return;
}