diff options
27 files changed, 205 insertions, 114 deletions
diff --git a/make/build-test.xml b/make/build-test.xml index c67cad365..3f9c6e2d5 100644 --- a/make/build-test.xml +++ b/make/build-test.xml @@ -578,6 +578,50 @@ ${line.separator} " append="true" file="${build.test}/targetcommand.sh" /> </sequential> </for> + + <for param="test.class.path.m" keepgoing="true"> + <!-- results in absolute path --> + <fileset dir="${classes}"> + <include name="${java.dir.junit}/**/Test*AWT*"/> + <exclude name="**/*$$*"/> + <exclude name="**/*SWT*"/> + <exclude name="${java.dir.junit}/**/Test*NEWT*"/> + </fileset> + <sequential> + <var name="test.class.path" unset="true"/> + <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/> + <var name="test.class.fqn" unset="true"/> + <pathconvert property="test.class.fqn"> + <fileset file="${classes}${file.separator}${test.class.path}"/> + <chainedmapper> + <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. --> + <packagemapper from="*.class" to="*"/> <!-- FQCN --> + </chainedmapper> + </pathconvert> + <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/> + <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/> + <echo message="${line.separator} +export DISPLAY=:0.0${line.separator} +java \${line.separator} +${junit.run.arg0}\${line.separator} +${junit.run.arg1}\${line.separator} +${jvmDataModel.arg}\${line.separator} +-cp ${junit_jogl_awt.run.remote.jars}\${line.separator} +org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner \${line.separator} +${test.class.fqn} \${line.separator} +filtertrace=true \${line.separator} +haltOnError=false \${line.separator} +haltOnFailure=false \${line.separator} +showoutput=true \${line.separator} +outputtoformatters=true \${line.separator} +logfailedtests=true \${line.separator} +logtestlistenerevents=true \${line.separator} +formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter \${line.separator} +formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file} ${line.separator} +${line.separator} +" append="true" file="${build.test}/targetcommand.sh" /> + </sequential> + </for> <exec dir="." executable="sh" logError="true" failonerror="true" failifexecutionfails="true"> <arg line='-x -c " chmod 0755 ${build.test}/targetcommand.sh ; diff --git a/make/scripts/targetcommand-awt.sh b/make/scripts/targetcommand-awt.sh new file mode 100755 index 000000000..e50e6c8a2 --- /dev/null +++ b/make/scripts/targetcommand-awt.sh @@ -0,0 +1,59 @@ +#! /bin/sh + +THISDIR=`pwd` + +#XTRA_FLAGS="-Dnewt.test.Screen.disableScreenMode -Djogl.debug.EGL -Djogl.debug.GLDrawable" +XTRA_FLAGS="-Dnewt.test.Screen.disableScreenMode" +#XTRA_FLAGS="-Dnewt.debug.Screen" +#XTRA_FLAGS="-Dnativewindow.debug.GraphicsConfiguration -Dnativewindow.debug.NativeWindow" +#XTRA_FLAGS="-Dnewt.debug.Window -Djogl.debug.EGL -Djogl.debug.GLContext -Djogl.debug.GLDrawable" +#XTRA_FLAGS="-Djogl.debug.GLContext -Djogl.debug.GLProfile -Djogl.debug.GLDrawable" +#XTRA_FLAGS="-Djogl.debug.EGL" +#XTRA_FLAGS="-Djogl.debug.GraphicsConfiguration" +#XTRA_FLAGS="-Djogl.debug.GLContext -Djogl.debug.GLDrawable" +#XTRA_FLAGS="-Djogl.debug.TraceGL" +#XTRA_FLAGS="-Djogl.debug.DebugGL -Djogl.debug.TraceGL" + +TSTCLASS=com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT +#TSTCLASS=com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT + + mkdir -p $THISDIR/projects-cross + + rsync -av --delete --delete-after --delete-excluded \ + --exclude 'build-x86*/' --exclude 'build-linux-x*/' --exclude 'build-android*/' --exclude 'build-win*/' --exclude 'build-mac*/' \ + --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude '*-java-src.zip' \ + jogamp@jogamp02::PROJECTS/JOGL/gluegen jogamp@jogamp02::PROJECTS/JOGL/jogl $THISDIR/projects-cross + + cd $THISDIR/projects-cross/jogl/make + +function junit_run() { + java \ + -cp ../../gluegen/make/lib/junit.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/ant-junit.jar:../../gluegen/build-linux-armv7/gluegen-rt.jar:../build-linux-armv7/jar/jogl.all.jar:../build-linux-armv7/jar/jogl.test.jar\ + $XTRA_FLAGS \ + com.jogamp.newt.util.MainThread\ + org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner \ + $TSTCLASS \ + filtertrace=true \ + haltOnError=false \ + haltOnFailure=false \ + showoutput=true \ + outputtoformatters=true \ + logfailedtests=true \ + logtestlistenerevents=true \ + formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter \ + formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,$THISDIR/targetcommand.xml +} + +function main_run() { + java \ + -cp ../../gluegen/make/lib/junit.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/ant-junit.jar:../../gluegen/build-linux-armv7/gluegen-rt.jar:../build-linux-armv7/jar/jogl.all.jar:../build-linux-armv7/jar/jogl.test.jar\ + $XTRA_FLAGS \ + com.jogamp.newt.util.MainThread\ + $TSTCLASS \ + $* +} + +# junit_run 2>&1 | tee $THISDIR/targetcommand.log + +main_run $* 2>&1 | tee $THISDIR/targetcommand.log + diff --git a/make/scripts/targetcommand-1.sh b/make/scripts/targetcommand-newt.sh index 5933b6a79..5933b6a79 100755 --- a/make/scripts/targetcommand-1.sh +++ b/make/scripts/targetcommand-newt.sh diff --git a/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java b/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java index 04ce155e6..18a432428 100644 --- a/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java +++ b/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java @@ -17,7 +17,7 @@ public class Bug427GLJPanelTest1 extends JFrame implements GLEventListener { setLocation(40, 40);
setVisible(true);
- GLProfile glp = GLProfile.getDefault();
+ GLProfile glp = GLProfile.get(GLProfile.GL2);
GLCapabilities caps = new GLCapabilities(glp);
caps.setDoubleBuffered(true);
caps.setHardwareAccelerated(true);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestNVSwapGroupNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestNVSwapGroupNEWT.java index 05f122bb4..54f99433c 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestNVSwapGroupNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestNVSwapGroupNEWT.java @@ -52,7 +52,7 @@ public class TestNVSwapGroupNEWT extends UITestCase { @BeforeClass public static void initClass() { - glp = GLProfile.getDefault(); + glp = GLProfile.getGL2ES2(); Assert.assertNotNull(glp); caps = new GLCapabilities(glp); Assert.assertNotNull(caps); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestPBufferDeadlockAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestPBufferDeadlockAWT.java index 5f04ed616..7ef606c2e 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestPBufferDeadlockAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestPBufferDeadlockAWT.java @@ -51,7 +51,7 @@ public class TestPBufferDeadlockAWT extends UITestCase { @BeforeClass public static void initClass() { - glp = GLProfile.getDefault(); + glp = GLProfile.getGL2ES2(); Assert.assertNotNull( glp ); width = 512; height = 512; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteAWT.java index 075aca74b..9f2820a37 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteAWT.java @@ -51,7 +51,7 @@ public class TestShutdownCompleteAWT extends UITestCase { final Frame frame = new Frame("Gears AWT Test"); Assert.assertNotNull(frame); - final GLCanvas glCanvas = new GLCanvas(new GLCapabilities(GLProfile.getDefault())); + final GLCanvas glCanvas = new GLCanvas(new GLCapabilities(GLProfile.getGL2ES2())); Assert.assertNotNull(glCanvas); frame.add(glCanvas); frame.setSize(256, 256); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java index 470ba078e..459284177 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java @@ -48,7 +48,7 @@ public class TestShutdownCompleteNEWT extends UITestCase { static long duration = 300; // ms protected void runTestGL() throws InterruptedException { - GLWindow glWindow = GLWindow.create(new GLCapabilities(GLProfile.getDefault())); + GLWindow glWindow = GLWindow.create(new GLCapabilities(GLProfile.getGL2ES2())); Assert.assertNotNull(glWindow); glWindow.setTitle("Gears NEWT Test"); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownSharedAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownSharedAWT.java index 8149e2429..3274ea820 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownSharedAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownSharedAWT.java @@ -51,7 +51,7 @@ public class TestShutdownSharedAWT extends UITestCase { final Frame frame = new Frame("Gears AWT Test"); Assert.assertNotNull(frame); - final GLCanvas glCanvas = new GLCanvas(new GLCapabilities(GLProfile.getDefault())); + final GLCanvas glCanvas = new GLCanvas(new GLCapabilities(GLProfile.getGL2ES2())); Assert.assertNotNull(glCanvas); frame.add(glCanvas); frame.setSize(256, 256); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownSharedNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownSharedNEWT.java index e1289ba79..8db7dff9b 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownSharedNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownSharedNEWT.java @@ -48,7 +48,7 @@ public class TestShutdownSharedNEWT extends UITestCase { static long duration = 300; // ms protected void runTestGL() throws InterruptedException { - GLWindow glWindow = GLWindow.create(new GLCapabilities(GLProfile.getDefault())); + GLWindow glWindow = GLWindow.create(new GLCapabilities(GLProfile.getGL2ES2())); Assert.assertNotNull(glWindow); glWindow.setTitle("Gears NEWT Test"); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT01GLn.java index 55bdb9514..64a1a0138 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT01GLn.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT01GLn.java @@ -116,16 +116,24 @@ public class TestAWT01GLn extends UITestCase { public void test01GLDefault() throws InterruptedException { GLProfile glp = GLProfile.getDefault(); System.out.println("GLProfile Default: "+glp); - GLCapabilities caps = new GLCapabilities(glp); - runTestGL(caps); + if(glp.isGL2ES2()) { + GLCapabilities caps = new GLCapabilities(glp); + runTestGL(caps); + } else { + System.out.println("not a GL2ES2 profile"); + } } @Test public void test02GL2() throws InterruptedException { - GLProfile glprofile = GLProfile.get(GLProfile.GL2); - System.out.println( "GLProfile GL2: " + glprofile ); - GLCapabilities caps = new GLCapabilities(glprofile); - runTestGL(caps); + if(GLProfile.isAvailable(GLProfile.GL2)) { + GLProfile glprofile = GLProfile.get(GLProfile.GL2); + System.out.println( "GLProfile GL2: " + glprofile ); + GLCapabilities caps = new GLCapabilities(glprofile); + runTestGL(caps); + } else { + System.out.println("GL2 n/a"); + } } public static void main(String args[]) { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug551AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug551AWT.java index 4f9fa2529..e68ddb4c1 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug551AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug551AWT.java @@ -38,7 +38,6 @@ import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; -import java.awt.Frame; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; @@ -46,8 +45,6 @@ import java.awt.Rectangle; import java.awt.Window; import javax.swing.JFrame; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assume.*; @@ -84,7 +81,7 @@ public class TestBug551AWT extends UITestCase { protected void runTestGL() throws InterruptedException, InvocationTargetException { final Window window = new JFrame(this.getSimpleTestName(" - ")); - final GLCapabilities caps = new GLCapabilities(GLProfile.getDefault()); + final GLCapabilities caps = new GLCapabilities(GLProfile.getGL2ES2()); // final array as mutable container hack final GLCanvas[] glCanvas = new GLCanvas[1]; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestSwingAWT01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestSwingAWT01GLn.java index 29f83fcdf..007df9f49 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestSwingAWT01GLn.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestSwingAWT01GLn.java @@ -129,16 +129,24 @@ public class TestSwingAWT01GLn extends UITestCase { public void test01GLDefault() throws InterruptedException, InvocationTargetException { GLProfile glp = GLProfile.getDefault(); System.out.println("GLProfile Default: "+glp); - GLCapabilities caps = new GLCapabilities(glp); - runTestGL(caps); + if(glp.isGL2ES2()) { + GLCapabilities caps = new GLCapabilities(glp); + runTestGL(caps); + } else { + System.out.println("not a GL2ES2 profile"); + } } @Test public void test02GL2() throws InterruptedException, InvocationTargetException { - GLProfile glprofile = GLProfile.get(GLProfile.GL2); - System.out.println( "GLProfile GL2: " + glprofile ); - GLCapabilities caps = new GLCapabilities(glprofile); - runTestGL(caps); + if(GLProfile.isAvailable(GLProfile.GL2)) { + GLProfile glprofile = GLProfile.get(GLProfile.GL2); + System.out.println( "GLProfile GL2: " + glprofile ); + GLCapabilities caps = new GLCapabilities(glprofile); + runTestGL(caps); + } else { + System.out.println("GL2 n/a"); + } } public static void main(String args[]) { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/OneTriangle.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OneTriangle.java index fa4d8190e..a2455e743 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/OneTriangle.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OneTriangle.java @@ -26,11 +26,14 @@ * or implied, of JogAmp Community.
*/
-package com.jogamp.opengl.test.junit.jogl.demos.gl2;
+package com.jogamp.opengl.test.junit.jogl.demos.es1;
import javax.media.opengl.GL;
-import javax.media.opengl.GL2;
+import javax.media.opengl.GL2ES1;
import javax.media.opengl.glu.GLU;
+import javax.media.opengl.glu.gl2es1.GLUgl2es1;
+
+import com.jogamp.opengl.util.ImmModeSink;
/**
* A utility class to encapsulate drawing a single triangle for unit tests.
@@ -38,32 +41,38 @@ import javax.media.opengl.glu.GLU; */
public class OneTriangle {
- public static void setup( GL2 gl, int width, int height ) {
- gl.glMatrixMode( GL2.GL_PROJECTION );
+ public static void setup( GL2ES1 gl, int width, int height ) {
+ gl.glMatrixMode( GL2ES1.GL_PROJECTION );
gl.glLoadIdentity();
// coordinate system origin at lower left with width and height same as the window
- GLU glu = new GLU();
+ GLU glu = new GLUgl2es1();
glu.gluOrtho2D( 0.0f, width, 0.0f, height );
- gl.glMatrixMode( GL2.GL_MODELVIEW );
+ gl.glMatrixMode( GL2ES1.GL_MODELVIEW );
gl.glLoadIdentity();
- gl.glViewport( 0, 0, width, height );
+ gl.glViewport( 0, 0, width, height );
}
- public static void render( GL2 gl, int width, int height) {
+ public static void render( GL2ES1 gl, int width, int height) {
gl.glClear( GL.GL_COLOR_BUFFER_BIT );
// draw a triangle filling the window
gl.glLoadIdentity();
- gl.glBegin( GL.GL_TRIANGLES );
- gl.glColor3f( 1, 0, 0 );
- gl.glVertex2f( 0, 0 );
- gl.glColor3f( 0, 1, 0 );
- gl.glVertex2f( width, 0 );
- gl.glColor3f( 0, 0, 1 );
- gl.glVertex2f( width / 2, height );
- gl.glEnd();
+
+ ImmModeSink immModeSink = ImmModeSink.createFixed(gl, GL.GL_STATIC_DRAW, 3,
+ 3, GL.GL_FLOAT, // vertex
+ 3, GL.GL_FLOAT, // color
+ 0, GL.GL_FLOAT,// normal
+ 0, GL.GL_FLOAT); // texture
+ immModeSink.glBegin(GL.GL_TRIANGLES);
+ immModeSink.glColor3f( 1, 0, 0 );
+ immModeSink.glVertex2f( 0, 0 );
+ immModeSink.glColor3f( 0, 1, 0 );
+ immModeSink.glVertex2f( width, 0 );
+ immModeSink.glColor3f( 0, 0, 1 );
+ immModeSink.glVertex2f( width / 2, height );
+ immModeSink.glEnd(gl, true);
}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java index be3ffe3a0..c7254dda6 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java @@ -44,7 +44,6 @@ import javax.swing.SwingUtilities; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.AfterClass; -import org.junit.Ignore; import org.junit.Test; public class TestGearsGLJPanelAWT extends UITestCase { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java index 4a58233f9..0f3c7e2ba 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java @@ -113,7 +113,7 @@ public class TestGearsNEWT extends UITestCase { @Test public void test01() throws InterruptedException { - GLCapabilities caps = new GLCapabilities(GLProfile.getDefault()); + GLCapabilities caps = new GLCapabilities(glp); runTestGL(caps); } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java index 9758235a9..54cfd0a99 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java @@ -35,7 +35,7 @@ import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.test.junit.util.QuitAdapter; -import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears; +import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; import com.jogamp.newt.*; import com.jogamp.newt.event.*; import com.jogamp.newt.opengl.*; @@ -51,14 +51,10 @@ public class TestGearsNewtAWTWrapper extends UITestCase { @BeforeClass public static void initClass() { - if(GLProfile.isAvailable(GLProfile.GL2)) { - glp = GLProfile.get(GLProfile.GL2); - Assert.assertNotNull(glp); - width = 512; - height = 512; - } else { - setTestSupported(false); - } + glp = GLProfile.getGL2ES2(); + Assert.assertNotNull(glp); + width = 512; + height = 512; } @AfterClass @@ -74,7 +70,7 @@ public class TestGearsNewtAWTWrapper extends UITestCase { Assert.assertNotNull(glWindow); glWindow.setTitle("Gears NewtAWTWrapper Test"); - glWindow.addGLEventListener(new Gears()); + glWindow.addGLEventListener(new GearsES2(1)); Animator animator = new Animator(glWindow); QuitAdapter quitAdapter = new QuitAdapter(); @@ -97,7 +93,7 @@ public class TestGearsNewtAWTWrapper extends UITestCase { @Test public void test01() throws InterruptedException { - GLCapabilitiesImmutable caps = new GLCapabilities(GLProfile.getDefault()); + GLCapabilitiesImmutable caps = new GLCapabilities(glp); runTestGL(caps); } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug463ScaleImageMemoryAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug463ScaleImageMemoryAWT.java index f23bca8bb..3f122accb 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug463ScaleImageMemoryAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug463ScaleImageMemoryAWT.java @@ -92,7 +92,7 @@ public class TestBug463ScaleImageMemoryAWT extends UITestCase implements GLEvent @Test public void test01() throws InterruptedException { - GLProfile glprofile = GLProfile.getDefault(); + GLProfile glprofile = GLProfile.getGL2ES1(); GLCapabilities glCapabilities = new GLCapabilities(glprofile); final GLCanvas canvas = new GLCanvas(glCapabilities); canvas.addGLEventListener( this ); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java b/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java index bacf54506..b165a9693 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java @@ -245,7 +245,7 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase { public void test01NewtCanvasAWT() throws AWTException, InterruptedException, InvocationTargetException { System.err.println("TestSwingAWTRobotUsageBeforeJOGLInitBug411.test01NewtCanvasAWT(): Start"); - GLProfile glp = GLProfile.getDefault(); + GLProfile glp = GLProfile.getGL2ES2(); GLCapabilities caps = new GLCapabilities(glp); GLWindow win0 = GLWindow.create(caps); @@ -280,7 +280,7 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase { @Test public void test02GLCanvas() throws AWTException, InterruptedException, InvocationTargetException { System.err.println("TestSwingAWTRobotUsageBeforeJOGLInitBug411.test02GLCanvas(): Start"); - GLProfile glp = GLProfile.getDefault(); + GLProfile glp = GLProfile.getGL2ES2(); GLCapabilities caps = new GLCapabilities(glp); Animator anim = new Animator(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java index 6139d816a..8b5c30ddf 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java @@ -31,7 +31,7 @@ package com.jogamp.opengl.test.junit.jogl.swt; import java.awt.Frame;
import java.lang.reflect.InvocationTargetException;
-import javax.media.opengl.GL2;
+import javax.media.opengl.GL2ES1;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
@@ -55,7 +55,7 @@ import org.junit.BeforeClass; import org.junit.After;
import org.junit.Test;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.OneTriangle;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.OneTriangle;
import com.jogamp.opengl.test.junit.util.UITestCase;
/**
@@ -75,7 +75,10 @@ public class TestSWTAWT01GLn extends UITestCase { @BeforeClass
public static void startup() {
- System.out.println( "GLProfile " + GLProfile.glAvailabilityToString() );
+ System.out.println( "GLProfile " + GLProfile.glAvailabilityToString() );
+ if(!GLProfile.isAvailable(GLProfile.GL2)) {
+ setTestSupported(false);
+ }
}
@Before
@@ -140,14 +143,14 @@ public class TestSWTAWT01GLn extends UITestCase { /* @Override */
public void display( GLAutoDrawable glautodrawable ) {
Rectangle rectangle = new Rectangle( 0, 0, glautodrawable.getWidth(), glautodrawable.getHeight() );
- GL2 gl = glautodrawable.getGL().getGL2();
+ GL2ES1 gl = glautodrawable.getGL().getGL2ES1();
OneTriangle.render( gl, rectangle.width, rectangle.height );
}
/* @Override */
public void reshape( GLAutoDrawable glautodrawable, int x, int y, int width, int height ) {
Rectangle rectangle = new Rectangle( 0, 0, glautodrawable.getWidth(), glautodrawable.getHeight() );
- GL2 gl = glautodrawable.getGL().getGL2();
+ GL2ES1 gl = glautodrawable.getGL().getGL2ES1();
OneTriangle.setup( gl, rectangle.width, rectangle.height );
}
});
@@ -181,16 +184,8 @@ public class TestSWTAWT01GLn extends UITestCase { }
@Test
- public void test01GLDefault() throws InterruptedException {
- GLProfile glprofile = GLProfile.getDefault();
- System.out.println( "GLProfile Default: " + glprofile );
- runTestGL( glprofile );
- }
-
- @Test
- public void test02GL2() throws InterruptedException {
- GLProfile glprofile = GLProfile.get(GLProfile.GL2);
- System.out.println( "GLProfile GL2: " + glprofile );
+ public void test() throws InterruptedException {
+ GLProfile glprofile = GLProfile.getGL2ES1();
runTestGL( glprofile );
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java index 81c2fc4ee..c60d2bfd3 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java @@ -28,7 +28,7 @@ package com.jogamp.opengl.test.junit.jogl.swt; -import javax.media.opengl.GL2; +import javax.media.opengl.GL2ES1; import javax.media.opengl.GLContext; import javax.media.opengl.GLDrawableFactory; import javax.media.opengl.GLProfile; @@ -51,7 +51,7 @@ import org.junit.BeforeClass; import org.junit.After; import org.junit.Test; -import com.jogamp.opengl.test.junit.jogl.demos.gl2.OneTriangle; +import com.jogamp.opengl.test.junit.jogl.demos.es1.OneTriangle; import com.jogamp.opengl.test.junit.util.UITestCase; import javax.media.nativewindow.AbstractGraphicsDevice; import javax.media.nativewindow.ProxySurface; @@ -179,7 +179,7 @@ public class TestSWTAccessor02GLn extends UITestCase { boolean glok=false; if( GLContext.CONTEXT_NOT_CURRENT < glcontext.makeCurrent() ) { glok=true; - GL2 gl = glcontext.getGL().getGL2(); + GL2ES1 gl = glcontext.getGL().getGL2ES1(); OneTriangle.setup( gl, rectangle.width, rectangle.height ); glcontext.release(); } else { @@ -196,7 +196,7 @@ public class TestSWTAccessor02GLn extends UITestCase { boolean glok=false; if( GLContext.CONTEXT_NOT_CURRENT < glcontext.makeCurrent() ) { glok=true; - GL2 gl = glcontext.getGL().getGL2(); + GL2ES1 gl = glcontext.getGL().getGL2ES1(); if(sizeMissing[0]) { OneTriangle.setup( gl, rectangle.width, rectangle.height); sizeMissing[0] = false; @@ -232,16 +232,8 @@ public class TestSWTAccessor02GLn extends UITestCase { } @Test - public void testA01GLDefault() throws InterruptedException { - GLProfile glprofile = GLProfile.getDefault(); - System.out.println( "GLProfile Default: " + glprofile ); - runTestAGL( glprofile ); - } - - @Test - public void test02GL2() throws InterruptedException { - GLProfile glprofile = GLProfile.get(GLProfile.GL2); - System.out.println( "GLProfile GL2: " + glprofile ); + public void test() throws InterruptedException { + GLProfile glprofile = GLProfile.getGL2ES1(); runTestAGL( glprofile ); } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTEclipseGLCanvas01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTEclipseGLCanvas01GLn.java index 14be86475..ce3100a50 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTEclipseGLCanvas01GLn.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTEclipseGLCanvas01GLn.java @@ -28,7 +28,7 @@ package com.jogamp.opengl.test.junit.jogl.swt;
-import javax.media.opengl.GL2;
+import javax.media.opengl.GL2ES1;
import javax.media.opengl.GLContext;
import javax.media.opengl.GLDrawableFactory;
import javax.media.opengl.GLProfile;
@@ -53,7 +53,7 @@ import org.junit.BeforeClass; import org.junit.After;
import org.junit.Test;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.OneTriangle;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.OneTriangle;
import com.jogamp.opengl.test.junit.util.UITestCase;
/**
@@ -127,7 +127,7 @@ public class TestSWTEclipseGLCanvas01GLn extends UITestCase { Rectangle rectangle = glcanvas.getClientArea();
glcanvas.setCurrent();
glcontext.makeCurrent();
- GL2 gl = glcontext.getGL().getGL2();
+ GL2ES1 gl = glcontext.getGL().getGL2ES1();
OneTriangle.setup( gl, rectangle.width, rectangle.height );
glcontext.release();
System.err.println("resize");
@@ -140,7 +140,7 @@ public class TestSWTEclipseGLCanvas01GLn extends UITestCase { Rectangle rectangle = glcanvas.getClientArea();
glcanvas.setCurrent();
glcontext.makeCurrent();
- GL2 gl = glcontext.getGL().getGL2();
+ GL2ES1 gl = glcontext.getGL().getGL2ES1();
OneTriangle.render( gl, rectangle.width, rectangle.height );
glcanvas.swapBuffers();
glcontext.release();
@@ -169,16 +169,8 @@ public class TestSWTEclipseGLCanvas01GLn extends UITestCase { }
@Test
- public void testA01GLDefault() throws InterruptedException {
- GLProfile glprofile = GLProfile.getDefault();
- System.out.println( "GLProfile Default: " + glprofile );
- runTestAGL( glprofile );
- }
-
- @Test
- public void test02GL2() throws InterruptedException {
- GLProfile glprofile = GLProfile.get(GLProfile.GL2);
- System.out.println( "GLProfile GL2: " + glprofile );
+ public void test() throws InterruptedException {
+ GLProfile glprofile = GLProfile.getGL2ES1();
runTestAGL( glprofile );
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTJOGLGLCanvas01GLnAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTJOGLGLCanvas01GLnAWT.java index 6e5e7d802..f7e839c50 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTJOGLGLCanvas01GLnAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTJOGLGLCanvas01GLnAWT.java @@ -48,7 +48,7 @@ import org.junit.After; import org.junit.Test;
import com.jogamp.opengl.swt.GLCanvas;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.OneTriangle;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.OneTriangle;
import com.jogamp.opengl.test.junit.util.UITestCase;
/**
@@ -149,16 +149,8 @@ public class TestSWTJOGLGLCanvas01GLnAWT extends UITestCase { }
@Test
- public void testA01GLDefault() throws InterruptedException {
- GLProfile glprofile = GLProfile.getDefault();
- System.out.println( "GLProfile Default: " + glprofile );
- runTestAGL( glprofile );
- }
-
- @Test
- public void test02GL2() throws InterruptedException {
- GLProfile glprofile = GLProfile.get(GLProfile.GL2);
- System.out.println( "GLProfile GL2: " + glprofile );
+ public void test() throws InterruptedException {
+ GLProfile glprofile = GLProfile.getGL2ES1();
runTestAGL( glprofile );
}
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestEventSourceNotAWTBug.java b/src/test/com/jogamp/opengl/test/junit/newt/TestEventSourceNotAWTBug.java index 7956e22e6..ecf0ada8a 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestEventSourceNotAWTBug.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestEventSourceNotAWTBug.java @@ -60,7 +60,7 @@ public class TestEventSourceNotAWTBug extends UITestCase { jf.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); - final GLCapabilities caps = new GLCapabilities(GLProfile.getDefault()); + final GLCapabilities caps = new GLCapabilities(GLProfile.getGL2ES2()); final GLWindow glWindow = GLWindow.create(caps); final NewtCanvasAWT canvas = new NewtCanvasAWT(glWindow); jf.getContentPane().add(canvas); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java index be824c2c4..63fcfa97f 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java @@ -53,7 +53,7 @@ public class TestWindowClosingProtocol01AWT extends UITestCase { public void testCloseFrameGLCanvas() throws InterruptedException, InvocationTargetException { final Frame frame = new Frame("testCloseFrameGLCanvas AWT"); - GLProfile glp = GLProfile.getDefault(); + GLProfile glp = GLProfile.getGL2ES2(); GLCapabilities caps = new GLCapabilities(glp); final GLCanvas glCanvas = new GLCanvas(caps); glCanvas.addGLEventListener(new GearsES2()); @@ -104,7 +104,7 @@ public class TestWindowClosingProtocol01AWT extends UITestCase { public void testCloseJFrameGLCanvas() throws InterruptedException, InvocationTargetException { final JFrame frame = new JFrame("testCloseJFrameGLCanvas AWT"); - GLProfile glp = GLProfile.getDefault(); + GLProfile glp = GLProfile.getGL2ES2(); GLCapabilities caps = new GLCapabilities(glp); GLCanvas glCanvas = new GLCanvas(caps); glCanvas.addGLEventListener(new GearsES2()); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java index 8ad52cae7..b20e81805 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java @@ -49,7 +49,7 @@ public class TestWindowClosingProtocol02NEWT extends UITestCase { @Test public void testCloseGLWindow() throws InterruptedException, InvocationTargetException { - GLProfile glp = GLProfile.getDefault(); + GLProfile glp = GLProfile.getGL2ES2(); GLCapabilities caps = new GLCapabilities(glp); final GLWindow glWindow = GLWindow.create(caps); final AWTRobotUtil.WindowClosingListener windowClosingListener = AWTRobotUtil.addClosingListener(glWindow); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java index 19b2bbbf6..3b1acce6a 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java @@ -53,7 +53,7 @@ public class TestWindowClosingProtocol03NewtAWT extends UITestCase { public void testCloseJFrameNewtCanvasAWT() throws InterruptedException, InvocationTargetException { final JFrame frame = new JFrame("testCloseJFrameNewtCanvasAWT"); - GLProfile glp = GLProfile.getDefault(); + GLProfile glp = GLProfile.getGL2ES2(); GLCapabilities caps = new GLCapabilities(glp); final GLWindow glWindow = GLWindow.create(caps); final AWTRobotUtil.WindowClosingListener windowClosingListener = AWTRobotUtil.addClosingListener(glWindow); |