aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-07-07 03:39:43 +0200
committerSven Gothel <[email protected]>2011-07-07 03:39:43 +0200
commit29cc5fa0375026c09bcbfed16627fe9eb6c97846 (patch)
treeaefd65d00e5e9a6fa4e28a54f090737d65d37f09 /src/test/com/jogamp/opengl
parentc9903cf9d4ceda09ec07ef340f8aa3d0a104e23a (diff)
GLProfile: Initialization fix and clarifications ( GLExceptions on n/a profiles )
- GLProfile.initSingleton(boolean) (implicit or explicit) won't throw any exception anymore. Followup 'GLProfile GLProfile.get(..)' calls will throw a GLException, if n/a. Availability maybe queried via GLProfile.isAvailable(..). - GLCapabilties, GLCanvas, GLJPanel: Clarify case where GLException maybe thrown, i.e. no default GLProfile available on default device. - Remove redundant GLProfile.is<ProfileName>Available(..)
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java50
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java6
2 files changed, 24 insertions, 32 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
index 898337602..6f044e3d3 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
@@ -68,22 +68,22 @@ public class TestGLProfile01NEWT extends UITestCase {
GLProfile glp = GLProfile.getDefault();
System.out.println("GLProfile.getDefault(): "+glp);
if(glp.getName().equals(GLProfile.GL4bc)) {
- Assert.assertTrue(GLProfile.isGL4bcAvailable());
- Assert.assertTrue(GLProfile.isGL3bcAvailable());
- Assert.assertTrue(GLProfile.isGL2Available());
- Assert.assertTrue(GLProfile.isGL2ES1Available());
- Assert.assertTrue(GLProfile.isGL2ES2Available());
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4bc));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3bc));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
} else if(glp.getName().equals(GLProfile.GL3bc)) {
- Assert.assertTrue(GLProfile.isGL3bcAvailable());
- Assert.assertTrue(GLProfile.isGL2Available());
- Assert.assertTrue(GLProfile.isGL2ES1Available());
- Assert.assertTrue(GLProfile.isGL2ES2Available());
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3bc));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
} else if(glp.getName().equals(GLProfile.GL2)) {
- Assert.assertTrue(GLProfile.isGL2Available());
- Assert.assertTrue(GLProfile.isGL2ES1Available());
- Assert.assertTrue(GLProfile.isGL2ES2Available());
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
} else if(glp.getName().equals(GLProfile.GL2ES1)) {
- Assert.assertTrue(GLProfile.isGL2ES1Available());
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
}
dumpVersion(glp);
}
@@ -100,29 +100,21 @@ public class TestGLProfile01NEWT extends UITestCase {
GLProfile glp = GLProfile.getMaxProgrammable();
System.out.println("GLProfile.getMaxProgrammable(): "+glp);
if(glp.getName().equals(GLProfile.GL4)) {
- Assert.assertTrue(GLProfile.isGL4Available());
- Assert.assertTrue(GLProfile.isGL3Available());
- Assert.assertTrue(GLProfile.isGL2Available());
- Assert.assertTrue(GLProfile.isGL2ES1Available());
- Assert.assertTrue(GLProfile.isGL2ES2Available());
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
} else if(glp.getName().equals(GLProfile.GL3)) {
- Assert.assertTrue(GLProfile.isGL3Available());
- Assert.assertTrue(GLProfile.isGL2Available());
- Assert.assertTrue(GLProfile.isGL2ES1Available());
- Assert.assertTrue(GLProfile.isGL2ES2Available());
- } else if(glp.getName().equals(GLProfile.GL2)) {
- Assert.assertTrue(GLProfile.isGL2Available());
- Assert.assertTrue(GLProfile.isGL2ES1Available());
- Assert.assertTrue(GLProfile.isGL2ES2Available());
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3));
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
} else if(glp.getName().equals(GLProfile.GL2ES2)) {
- Assert.assertTrue(GLProfile.isGL2ES2Available());
+ Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
}
dumpVersion(glp);
}
@Test
public void test04GLProfileGL2ES1() throws InterruptedException {
- if(!GLProfile.isGL2ES1Available()) {
+ if(!GLProfile.isAvailable(GLProfile.GL2ES1)) {
System.out.println("GLProfile GL2ES1 n/a");
return;
}
@@ -133,7 +125,7 @@ public class TestGLProfile01NEWT extends UITestCase {
@Test
public void test05GLProfileGL2ES2() throws InterruptedException {
- if(!GLProfile.isGL2ES2Available()) {
+ if(!GLProfile.isAvailable(GLProfile.GL2ES2)) {
System.out.println("GLProfile GL2ES2 n/a");
return;
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java
index be4873ff6..a6d04cf24 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java
@@ -83,7 +83,7 @@ public class TestTransformFeedbackVaryingsBug407NEWT extends UITestCase {
private GLWindow prepareTest() {
- if(!GLProfile.isGL3Available()) {
+ if(!GLProfile.isAvailable(GLProfile.GL3)) {
System.err.println("GL3 not available");
System.err.println(GLProfile.glAvailabilityToString());
return null;
@@ -136,7 +136,7 @@ public class TestTransformFeedbackVaryingsBug407NEWT extends UITestCase {
@Test(timeout=60000)
public void testGlTransformFeedbackVaryings_WhenVarNameOK() {
- if(!GLProfile.isGL3Available()) {
+ if(!GLProfile.isAvailable(GLProfile.GL3)) {
return;
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -178,7 +178,7 @@ public class TestTransformFeedbackVaryingsBug407NEWT extends UITestCase {
@Test(timeout=60000)
public void testGlTransformFeedbackVaryings_WhenVarNameWrong() {
- if(!GLProfile.isGL3Available()) {
+ if(!GLProfile.isAvailable(GLProfile.GL3)) {
return;
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();