diff options
author | Sven Gothel <[email protected]> | 2012-02-29 02:31:25 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-02-29 02:31:25 +0100 |
commit | c739c6e02eff2e2b5f51ea9d5a385960b3bd07ca (patch) | |
tree | 17ce07b6849fa4d4691a9cc3d43a8cef665c23c7 /src/test/com/jogamp/opengl | |
parent | 03697923f27df06343f8885f1c1b70bf4b3af9c2 (diff) |
CrossTest: Add AWT Unit-Test. Unit-Tests: Refine GLProfile request where we favor a more detailed request than getDefault().
Diffstat (limited to 'src/test/com/jogamp/opengl')
24 files changed, 102 insertions, 114 deletions
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); |