summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
index 2d989ef65..eb2c7bf82 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
@@ -54,6 +54,9 @@ public class TestTextRendererNEWT10 extends UITestCase {
static final boolean DEBUG = false;
static final boolean TRACE = false;
static long duration = 100; // ms
+ static boolean forceES2 = false;
+ static boolean forceGL3 = false;
+ static boolean mainRun = false;
static final float[] textPosition = new float[] {0,0,0};
static final int[] texSize = new int[] { 0 };
@@ -72,10 +75,15 @@ public class TestTextRendererNEWT10 extends UITestCase {
}
public static void main(String args[]) throws IOException {
+ mainRun = true;
for(int i=0; i<args.length; i++) {
if(args[i].equals("-time")) {
i++;
duration = atoi(args[i]);
+ } else if(args[i].equals("-es2")) {
+ forceES2 = true;
+ } else if(args[i].equals("-gl3")) {
+ forceGL3 = true;
}
}
String tstname = TestTextRendererNEWT10.class.getName();
@@ -91,8 +99,15 @@ public class TestTextRendererNEWT10 extends UITestCase {
@Test
public void testTextRendererMSAA01() throws InterruptedException {
- GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
- GLCapabilities caps = new GLCapabilities(glp);
+ final GLProfile glp;
+ if(forceGL3) {
+ glp = GLProfile.get(GLProfile.GL3);
+ } else if(forceES2) {
+ glp = GLProfile.get(GLProfile.GLES2);
+ } else {
+ glp = GLProfile.getGL2ES2();
+ }
+ final GLCapabilities caps = new GLCapabilities( glp );
caps.setAlphaBits(4);
caps.setSampleBuffers(true);
caps.setNumSamples(4);