From 59a5ce435cce9f44f22999ebc89a603cacd53920 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 1 Aug 2011 22:09:43 +0200 Subject: Test Gears GL2ES1: Favor native ES1 if available. --- .../junit/jogl/demos/gl2es1/gears/newt/TestGearsGL2ES1NEWT.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/test/com/jogamp') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2es1/gears/newt/TestGearsGL2ES1NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2es1/gears/newt/TestGearsGL2ES1NEWT.java index 43fa2852e..ffba7c050 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2es1/gears/newt/TestGearsGL2ES1NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2es1/gears/newt/TestGearsGL2ES1NEWT.java @@ -53,7 +53,13 @@ public class TestGearsGL2ES1NEWT extends UITestCase { @BeforeClass public static void initClass() { GLProfile.initSingleton(true); - glp = GLProfile.getGL2ES1(); + if(GLProfile.isAvailable(GLProfile.getDefaultEGLDevice(), GLProfile.GLES1)) { + // exact match + glp = GLProfile.get(GLProfile.getDefaultEGLDevice(), GLProfile.GLES1); + } else { + // default device, somehow ES1 compatible + glp = GLProfile.getGL2ES1(); + } Assert.assertNotNull(glp); width = 512; height = 512; -- cgit v1.2.3