aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-13 02:26:48 +0100
committerSven Gothel <[email protected]>2010-12-13 02:26:48 +0100
commit84a76425dd10933a7ad033920a1e0ce12a2a107b (patch)
tree3f4b1c3d61edb539232bf6bbcf1e673cc011b1d4 /src
parent519776330c78e296d9868e959ddc64d00acac496 (diff)
Cleanup test/junit structure. com.jogamp.test -> com.jogamp.opengl.text; Compile posted Issue* Bug* snippets
Diffstat (limited to 'src')
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanel.java72
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java94
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java73
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Issue344Base.java107
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Issue344Test1.java12
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Issue344Test2.java12
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Issue344Test3.java12
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Issue344Test4.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/acore/TestGLProfile01NEWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/acore/TestSharedContextListAWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/acore/TestSharedContextListNEWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT01GLn.java (renamed from src/junit/com/jogamp/test/junit/jogl/awt/TestAWT01GLn.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT02WindowClosing.java (renamed from src/junit/com/jogamp/test/junit/jogl/awt/TestAWT02WindowClosing.java)4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT03GLCanvasRecreate01.java (renamed from src/junit/com/jogamp/test/junit/jogl/awt/TestAWT03GLCanvasRecreate01.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/awt/TestSwingAWT01GLn.java (renamed from src/junit/com/jogamp/test/junit/jogl/awt/TestSwingAWT01GLn.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleChooser01.java (renamed from src/junit/com/jogamp/test/junit/jogl/caps/MultisampleChooser01.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleDemo01.java (renamed from src/junit/com/jogamp/test/junit/jogl/caps/MultisampleDemo01.java)2
-rwxr-xr-xsrc/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleAWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/caps/TestMultisampleAWT.java)6
-rwxr-xr-xsrc/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleNEWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/caps/TestMultisampleNEWT.java)4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/RedSquare.java (renamed from src/junit/com/jogamp/test/junit/jogl/demos/es1/RedSquare.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquare0.java (renamed from src/junit/com/jogamp/test/junit/jogl/demos/es2/RedSquare0.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java (renamed from src/junit/com/jogamp/test/junit/jogl/demos/es2/shader/RedSquareShader.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/Gears.java (renamed from src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/Gears.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java)4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java (renamed from src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/drawable/TestDrawable01NEWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/drawable/TestDrawable01NEWT.java)4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java)12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java)4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java (renamed from src/junit/com/jogamp/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2File.java (renamed from src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2File.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java (renamed from src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2Screen.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferBase.java (renamed from src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferBase.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferUtil.java (renamed from src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferUtil.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/offscreen/Surface2File.java (renamed from src/junit/com/jogamp/test/junit/jogl/offscreen/Surface2File.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01NEWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/offscreen/WindowUtilNEWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/offscreen/WindowUtilNEWT.java)4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/texture/TestTexture01AWT.java (renamed from src/junit/com/jogamp/test/junit/jogl/texture/TestTexture01AWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/util/texture/gl2/TextureGL2ListenerDraw1.java (renamed from src/junit/com/jogamp/test/junit/jogl/util/texture/gl2/TextureGL2ListenerDraw1.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestCloseNewtAWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestCloseNewtAWT.java)4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestDisplayLifecycle01NEWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestDisplayLifecycle02NEWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestEventSourceNotAWTBug.java (renamed from src/junit/com/jogamp/test/junit/newt/TestEventSourceNotAWTBug.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java (renamed from src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWTRobot.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java (renamed from src/junit/com/jogamp/test/junit/newt/TestFocus02SwingAWTRobot.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestGLWindows00NEWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows01NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestGLWindows01NEWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java (renamed from src/junit/com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestListenerCom01AWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestRemoteGLWindows01NEWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestRemoteWindow01NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestRemoteWindow01NEWT.java)4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestScreenMode00NEWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestScreenMode01NEWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestScreenMode02NEWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/TestWindows01NEWT.java)4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom1.java (renamed from src/junit/com/jogamp/test/junit/newt/WindowEventCom1.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom2.java (renamed from src/junit/com/jogamp/test/junit/newt/WindowEventCom2.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom3.java (renamed from src/junit/com/jogamp/test/junit/newt/WindowEventCom3.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/GLRunnableDummy.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/GLRunnableDummy.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/KeyAction.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/KeyAction.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01NEWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01aAWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01bAWT.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01bAWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cAWT.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01cAWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01cSwingAWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02AWT.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/TestParenting02AWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/TestParenting02NEWT.java)8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/TestParenting03AWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/TestParenting03bAWT.java)6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/WindowAction.java (renamed from src/junit/com/jogamp/test/junit/newt/parenting/WindowAction.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/AWTFocusAdapter.java (renamed from src/junit/com/jogamp/test/junit/util/AWTFocusAdapter.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/AWTKeyAdapter.java (renamed from src/junit/com/jogamp/test/junit/util/AWTKeyAdapter.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java (renamed from src/junit/com/jogamp/test/junit/util/AWTMouseAdapter.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java (renamed from src/junit/com/jogamp/test/junit/util/AWTRobotUtil.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/DumpGLInfo.java (renamed from src/junit/com/jogamp/test/junit/util/DumpGLInfo.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/EventCountAdapter.java (renamed from src/junit/com/jogamp/test/junit/util/EventCountAdapter.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/EventCountAdapterUtil.java (renamed from src/junit/com/jogamp/test/junit/util/EventCountAdapterUtil.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java (renamed from src/junit/com/jogamp/test/junit/util/GLSLSimpleProgram.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/MiscUtils.java (renamed from src/junit/com/jogamp/test/junit/util/MiscUtils.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/NEWTFocusAdapter.java (renamed from src/junit/com/jogamp/test/junit/util/NEWTFocusAdapter.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/NEWTKeyAdapter.java (renamed from src/junit/com/jogamp/test/junit/util/NEWTKeyAdapter.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java (renamed from src/junit/com/jogamp/test/junit/util/NEWTMouseAdapter.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/QuitAdapter.java (renamed from src/junit/com/jogamp/test/junit/util/QuitAdapter.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/SingletonInstance.java (renamed from src/junit/com/jogamp/test/junit/util/SingletonInstance.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/UITestCase.java (renamed from src/junit/com/jogamp/test/junit/util/UITestCase.java)2
-rw-r--r--src/test/native/displayMultiple01.c18
-rw-r--r--src/test/native/displayMultiple02.c113
-rw-r--r--src/test/native/glExtensionsListGL2.c95
-rw-r--r--src/test/native/glExtensionsListGL3.c300
-rwxr-xr-xsrc/test/native/make.sh6
91 files changed, 1105 insertions, 179 deletions
diff --git a/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanel.java b/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanel.java
new file mode 100644
index 000000000..378952b59
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanel.java
@@ -0,0 +1,72 @@
+package com.jogamp.opengl.test.bugs;
+
+import javax.swing.*;
+import java.awt.*;
+import javax.media.opengl.*;
+import javax.media.opengl.awt.*;
+
+public class Bug427GLJPanel extends JFrame implements GLEventListener {
+
+ public Bug427GLJPanel() {
+ super("JOGL Hello World");
+
+ setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ setLayout(new BorderLayout());
+
+ setSize(600, 600);
+ setLocation(40, 40);
+ setVisible(true);
+
+ GLProfile glp = GLProfile.getDefault();
+ GLCapabilities caps = new GLCapabilities(glp);
+ caps.setDoubleBuffered(true);
+ caps.setHardwareAccelerated(true);
+
+ GLJPanel panel = new GLJPanel(caps);
+ panel.addGLEventListener(this);
+
+ add(panel, BorderLayout.CENTER);
+ }
+
+ public static void main(String[] args) {
+ Bug427GLJPanel demo = new Bug427GLJPanel();
+ demo.setVisible(true);
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ GL2 gl = drawable.getGL().getGL2();
+
+ gl.glClear(GL.GL_COLOR_BUFFER_BIT);
+ gl.glBegin(GL.GL_TRIANGLES);
+
+ gl.glColor3f(1, 0, 0);
+ gl.glVertex3f(0.25f, 0.25f, 0);
+
+ gl.glColor3f(0, 1, 0);
+ gl.glVertex3f(0.5f, 0.25f, 0);
+
+ gl.glColor3f(0, 0, 1);
+ gl.glVertex3f(0.25f, 0.5f, 0);
+
+ gl.glEnd();
+ gl.glFlush();
+ }
+
+ public void init(GLAutoDrawable drawable) {
+ GL2 gl = drawable.getGL().getGL2();
+
+ gl.glClearColor(0, 0, 0, 0);
+ gl.glMatrixMode(GL2.GL_PROJECTION);
+ gl.glLoadIdentity();
+ gl.glOrtho(0, 1, 0, 1, -1, 1);
+ }
+
+ public void reshape(GLAutoDrawable glDrawable, int x, int y, int w, int h) {
+ }
+
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {
+ }
+
+ public void dispose(GLAutoDrawable drawable) {
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java b/src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java
new file mode 100644
index 000000000..4c2b54755
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java
@@ -0,0 +1,94 @@
+package com.jogamp.opengl.test.bugs;
+
+import java.awt.Frame;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.util.Random;
+
+import javax.media.opengl.GL2;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.awt.GLCanvas;
+import javax.media.opengl.glu.GLU;
+
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.awt.TextRenderer;
+
+/**
+ * Demonstrates corruption with older versions of TextRenderer. Two
+ * problems: errors when punting from glyph-based renderer to
+ * string-by-string renderer, and failure of glyph-based renderer when
+ * backing store was NPOT using GL_ARB_texture_rectangle.
+ *
+ * @author emzic
+ */
+
+public class Issue326Test1 extends Frame implements GLEventListener {
+
+ int width, height;
+
+ public static void main(String[] args) {
+ new Issue326Test1();
+ }
+
+ GLCanvas canvas;
+ TextRenderer tr ;
+
+ public Issue326Test1() {
+ super("TextTest");
+ this.setSize(800, 800);
+ canvas = new GLCanvas();
+ canvas.addGLEventListener(this);
+ add(canvas);
+
+ setVisible(true);
+ addWindowListener(new WindowAdapter() {
+ public void windowClosing(WindowEvent e) {
+ System.exit(0);
+ }
+ });
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ GL2 gl = drawable.getGL().getGL2();
+ gl.glClearColor(0, 0, 0, 0);
+ gl.glClear(GL2.GL_COLOR_BUFFER_BIT|GL2.GL_DEPTH_BUFFER_BIT);
+
+
+ gl.glMatrixMode(GL2.GL_PROJECTION);
+ gl.glLoadIdentity();
+ //new GLU().gluPerspective(45f, (float)width/(float)height, 0.1f, 1000f);
+ gl.glOrtho(0.0, 800, 0.0, 800, -100.0, 100.0);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glLoadIdentity();
+
+ tr.beginRendering(800,800);
+ tr.draw( "die Marktwirtschaft. Da regelt sich � angeblich", 16, 32);
+ tr.draw( "Hello World! This text is scrambled", 16, 16);
+ tr.endRendering();
+
+ }
+
+ public void init(GLAutoDrawable arg0) {
+ tr = new TextRenderer(new java.awt.Font("Verdana", java.awt.Font.PLAIN, 12), true, false, null, false);
+ tr.setColor(1, 1, 1 ,1);
+ }
+
+ public void reshape(GLAutoDrawable arg0, int arg1, int arg2, int arg3, int arg4) {
+ width = arg3;
+ height = arg4;
+ GL2 gl = arg0.getGL().getGL2();
+ gl.glViewport(0, 0, width, height);
+ gl.glMatrixMode(GL2.GL_PROJECTION);
+ gl.glLoadIdentity();
+ gl.glOrtho(0.0, 800, 0.0, 200, -100.0, 100.0);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glLoadIdentity();
+ }
+
+ public void dispose(GLAutoDrawable drawable) {}
+}
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java b/src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java
new file mode 100644
index 000000000..8960c9658
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java
@@ -0,0 +1,73 @@
+package com.jogamp.opengl.test.bugs;
+
+import java.awt.Font;
+import java.awt.Frame;
+import java.awt.event.*;
+import javax.media.opengl.GL2;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.awt.GLCanvas;
+
+import com.jogamp.opengl.util.awt.*;
+
+/**
+ * Another test case demonstrating corruption with older version of
+ * TextRenderer when glyphs were too big for backing store. Font and
+ * text courtesy of Patrick Murris. Adapted from Issue326Test1.
+ */
+
+public class Issue326Test2 extends Frame implements GLEventListener {
+
+ int width, height;
+
+ public static void main(String[] args) {
+ new Issue326Test2();
+ }
+
+ GLCanvas canvas;
+ TextRenderer tr;
+
+ public Issue326Test2() {
+ super("");
+ this.setSize(800, 800);
+ canvas = new GLCanvas();
+ canvas.addGLEventListener(this);
+ add(canvas);
+
+ setVisible(true);
+ addWindowListener(new WindowAdapter() {
+ public void windowClosing(WindowEvent e) {
+ System.exit(0);
+ }
+ });
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ GL2 gl = drawable.getGL().getGL2();
+ gl.glClearColor(0, 0, 0, 0);
+ gl.glClear(GL2.GL_COLOR_BUFFER_BIT|GL2.GL_DEPTH_BUFFER_BIT);
+
+ tr.beginRendering(drawable.getWidth(), drawable.getHeight());
+ tr.draw("LA CLAPI\u00c8RE \nAlt: 1100-1700m \nGlissement de terrain majeur", 16, 80);
+ tr.draw("dans la haute Tin\u00e9e, sur un flanc du Parc du Mercantour.", 16, 16);
+ tr.endRendering();
+
+ }
+
+ public void init(GLAutoDrawable arg0) {
+ tr = new TextRenderer(Font.decode("Arial-BOLD-64"));
+ tr.setColor(1, 1, 1 ,1);
+ }
+
+ public void reshape(GLAutoDrawable arg0, int x, int y, int w, int h) {
+ GL2 gl = arg0.getGL().getGL2();
+ gl.glMatrixMode(GL2.GL_PROJECTION);
+ gl.glLoadIdentity();
+ gl.glOrtho(0.0, w, 0.0, h, -1, 1);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glLoadIdentity();
+ }
+
+ public void dispose(GLAutoDrawable drawable) {}
+}
+
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue344Base.java b/src/test/com/jogamp/opengl/test/bugs/Issue344Base.java
new file mode 100644
index 000000000..c3401fec3
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue344Base.java
@@ -0,0 +1,107 @@
+package com.jogamp.opengl.test.bugs;
+
+import java.awt.BorderLayout;
+import java.awt.Font;
+import java.awt.Frame;
+import java.awt.event.*;
+import java.awt.geom.*;
+
+import javax.media.opengl.GL2;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.awt.GLCanvas;
+import javax.media.opengl.glu.*;
+import com.jogamp.opengl.util.awt.TextRenderer;
+
+/** Test Code adapted from TextCube.java (in JOGL demos)
+ *
+ * @author spiraljetty
+ * @author kbr
+ */
+
+public abstract class Issue344Base implements GLEventListener
+{
+ GLU glu = new GLU();
+ TextRenderer renderer;
+
+ float textScaleFactor;
+ Font font;
+ boolean useMipMaps;
+
+ protected Issue344Base() {
+ font = new Font("default", Font.PLAIN, 200);
+ useMipMaps = true; //false
+ }
+
+ protected abstract String getText();
+
+ protected void run(String[] args) {
+ Frame frame = new Frame(getClass().getName());
+ frame.setLayout(new BorderLayout());
+
+ GLCanvas canvas = new GLCanvas();
+ canvas.addGLEventListener(this);
+ frame.add(canvas, BorderLayout.CENTER);
+
+ frame.setSize(512, 512);
+ frame.addWindowListener(new WindowAdapter() {
+ public void windowClosing(WindowEvent e) {
+ new Thread(new Runnable() {
+ public void run() {
+ System.exit(0);
+ }
+ }).start();
+ }
+ });
+ frame.setVisible(true);
+ }
+
+ public void init(GLAutoDrawable drawable)
+ {
+ GL2 gl = drawable.getGL().getGL2();
+
+ gl.glEnable(GL2.GL_DEPTH_TEST);
+
+ renderer = new TextRenderer(font, useMipMaps);
+
+ Rectangle2D bounds = renderer.getBounds(getText());
+ float w = (float) bounds.getWidth();
+ float h = (float) bounds.getHeight();
+ textScaleFactor = 2.0f / (w * 1.1f);
+ gl.setSwapInterval(0);
+ }
+
+ public void display(GLAutoDrawable drawable)
+ {
+ GL2 gl = drawable.getGL().getGL2();
+ gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
+
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glLoadIdentity();
+ glu.gluLookAt(0, 0, 10,
+ 0, 0, 0,
+ 0, 1, 0);
+
+ renderer.begin3DRendering();
+ Rectangle2D bounds = renderer.getBounds(getText());
+ float w = (float) bounds.getWidth();
+ float h = (float) bounds.getHeight();
+ renderer.draw3D(getText(),
+ w / -2.0f * textScaleFactor,
+ h / -2.0f * textScaleFactor,
+ 3f,
+ textScaleFactor);
+
+ renderer.end3DRendering();
+ }
+
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height)
+ {
+ GL2 gl = drawable.getGL().getGL2();
+ gl.glMatrixMode(GL2.GL_PROJECTION);
+ gl.glLoadIdentity();
+ glu.gluPerspective(15, (float) width / (float) height, 5, 15);
+ }
+
+ public void dispose(GLAutoDrawable drawable) {}
+}
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue344Test1.java b/src/test/com/jogamp/opengl/test/bugs/Issue344Test1.java
new file mode 100644
index 000000000..f0da7cbf8
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue344Test1.java
@@ -0,0 +1,12 @@
+package com.jogamp.opengl.test.bugs;
+
+public class Issue344Test1 extends Issue344Base {
+ protected String getText() {
+ // test 1 - weird artifacts appear with a large font & long string
+ return "abcdefghijklmnopqrstuvwxyz1234567890";
+ }
+
+ public static void main(String[] args) {
+ new Issue344Test1().run(args);
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue344Test2.java b/src/test/com/jogamp/opengl/test/bugs/Issue344Test2.java
new file mode 100644
index 000000000..bb1acf2de
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue344Test2.java
@@ -0,0 +1,12 @@
+package com.jogamp.opengl.test.bugs;
+
+public class Issue344Test2 extends Issue344Base {
+ protected String getText() {
+ // test 2 - unicode hangs program with a large font & long string
+ return "\u201Cabcdefghijklmnopqrstuvwxyz\u201D";
+ }
+
+ public static void main(String[] args) {
+ new Issue344Test2().run(args);
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue344Test3.java b/src/test/com/jogamp/opengl/test/bugs/Issue344Test3.java
new file mode 100644
index 000000000..bb73d84ec
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue344Test3.java
@@ -0,0 +1,12 @@
+package com.jogamp.opengl.test.bugs;
+
+public class Issue344Test3 extends Issue344Base {
+ protected String getText() {
+ // test 3 - slight rendering artifacts around very large letters
+ return "abcde";
+ }
+
+ public static void main(String[] args) {
+ new Issue344Test3().run(args);
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue344Test4.java b/src/test/com/jogamp/opengl/test/bugs/Issue344Test4.java
new file mode 100644
index 000000000..de4c37a40
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue344Test4.java
@@ -0,0 +1,12 @@
+package com.jogamp.opengl.test.bugs;
+
+public class Issue344Test4 extends Issue344Base {
+ protected String getText() {
+ // test 4 - unicode letter as second-to-last is rendered incorrectly
+ return "\u201CGreetings\u201D!";
+ }
+
+ public static void main(String[] args) {
+ new Issue344Test4().run(args);
+ }
+}
diff --git a/src/junit/com/jogamp/test/junit/jogl/acore/TestGLProfile01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
index a1ca698ba..88caed357 100644
--- a/src/junit/com/jogamp/test/junit/jogl/acore/TestGLProfile01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
@@ -26,13 +26,13 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.acore;
+package com.jogamp.opengl.test.junit.jogl.acore;
import com.jogamp.common.GlueGenVersion;
import com.jogamp.common.util.VersionUtil;
import com.jogamp.nativewindow.NativeWindowVersion;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.util.DumpGLInfo;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.DumpGLInfo;
import org.junit.Assert;
import org.junit.Test;
diff --git a/src/junit/com/jogamp/test/junit/jogl/acore/TestSharedContextListAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
index b44158dce..dd3518fe3 100644
--- a/src/junit/com/jogamp/test/junit/jogl/acore/TestSharedContextListAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.acore;
+package com.jogamp.opengl.test.junit.jogl.acore;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLDrawableFactory;
@@ -35,8 +35,8 @@ import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
import java.awt.Frame;
diff --git a/src/junit/com/jogamp/test/junit/jogl/acore/TestSharedContextListNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
index cccd91b4c..24280f244 100644
--- a/src/junit/com/jogamp/test/junit/jogl/acore/TestSharedContextListNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.acore;
+package com.jogamp.opengl.test.junit.jogl.acore;
import com.jogamp.newt.opengl.GLWindow;
import javax.media.opengl.GLCapabilities;
@@ -35,8 +35,8 @@ import javax.media.opengl.GLPbuffer;
import javax.media.opengl.GLProfile;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
import org.junit.Assert;
import org.junit.BeforeClass;
diff --git a/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT01GLn.java
index a1c87da79..83561eb97 100644
--- a/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT01GLn.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT01GLn.java
@@ -26,15 +26,15 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.awt;
+package com.jogamp.opengl.test.junit.jogl.awt;
import javax.media.opengl.GLProfile;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
import java.awt.Frame;
diff --git a/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT02WindowClosing.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT02WindowClosing.java
index 6132f8232..535f0e99e 100644
--- a/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT02WindowClosing.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT02WindowClosing.java
@@ -26,9 +26,9 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.awt;
+package com.jogamp.opengl.test.junit.jogl.awt;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.UITestCase;
import javax.media.opengl.GLProfile;
import java.awt.*;
diff --git a/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT03GLCanvasRecreate01.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT03GLCanvasRecreate01.java
index a2f66859f..2faf8fa66 100644
--- a/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT03GLCanvasRecreate01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT03GLCanvasRecreate01.java
@@ -26,15 +26,15 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.awt;
+package com.jogamp.opengl.test.junit.jogl.awt;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
-import com.jogamp.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
import java.awt.Frame;
import java.awt.Label;
diff --git a/src/junit/com/jogamp/test/junit/jogl/awt/TestSwingAWT01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestSwingAWT01GLn.java
index 74ca0a3e7..8f642dfc9 100644
--- a/src/junit/com/jogamp/test/junit/jogl/awt/TestSwingAWT01GLn.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestSwingAWT01GLn.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.awt;
+package com.jogamp.opengl.test.junit.jogl.awt;
import java.lang.reflect.InvocationTargetException;
import javax.media.opengl.GLProfile;
@@ -34,8 +34,8 @@ import javax.media.opengl.GLCapabilities;
import javax.media.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
import java.awt.Frame;
import java.awt.Window;
import javax.swing.JFrame;
diff --git a/src/junit/com/jogamp/test/junit/jogl/caps/MultisampleChooser01.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleChooser01.java
index 7dcde18c9..9653038d1 100644
--- a/src/junit/com/jogamp/test/junit/jogl/caps/MultisampleChooser01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleChooser01.java
@@ -37,7 +37,7 @@
* Sun gratefully acknowledges that this software was originally authored
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.test.junit.jogl.caps;
+package com.jogamp.opengl.test.junit.jogl.caps;
import javax.media.opengl.DefaultGLCapabilitiesChooser;
import javax.media.opengl.GLCapabilitiesImmutable;
diff --git a/src/junit/com/jogamp/test/junit/jogl/caps/MultisampleDemo01.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleDemo01.java
index e399de0bc..a9995d8e8 100644
--- a/src/junit/com/jogamp/test/junit/jogl/caps/MultisampleDemo01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleDemo01.java
@@ -38,7 +38,7 @@
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.test.junit.jogl.caps;
+package com.jogamp.opengl.test.junit.jogl.caps;
import com.jogamp.opengl.impl.x11.glx.GLX;
import com.jogamp.opengl.impl.x11.glx.X11GLXGraphicsConfiguration;
diff --git a/src/junit/com/jogamp/test/junit/jogl/caps/TestMultisampleAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleAWT.java
index c6e7f08fa..53047611d 100755
--- a/src/junit/com/jogamp/test/junit/jogl/caps/TestMultisampleAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleAWT.java
@@ -38,13 +38,13 @@
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.test.junit.jogl.caps;
+package com.jogamp.opengl.test.junit.jogl.caps;
-import com.jogamp.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
import java.awt.*;
import javax.media.opengl.*;
import javax.media.opengl.awt.GLCanvas;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.UITestCase;
import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.nativewindow.AbstractGraphicsScreen;
import javax.media.nativewindow.GraphicsConfigurationFactory;
diff --git a/src/junit/com/jogamp/test/junit/jogl/caps/TestMultisampleNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleNEWT.java
index c060828ec..8285a6699 100755
--- a/src/junit/com/jogamp/test/junit/jogl/caps/TestMultisampleNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleNEWT.java
@@ -38,10 +38,10 @@
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.test.junit.jogl.caps;
+package com.jogamp.opengl.test.junit.jogl.caps;
import com.jogamp.newt.opengl.GLWindow;
-import com.jogamp.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
import javax.media.opengl.*;
import org.junit.Test;
diff --git a/src/junit/com/jogamp/test/junit/jogl/demos/es1/RedSquare.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/RedSquare.java
index be416f01d..eaf697a10 100644
--- a/src/junit/com/jogamp/test/junit/jogl/demos/es1/RedSquare.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/RedSquare.java
@@ -1,4 +1,4 @@
-package com.jogamp.test.junit.jogl.demos.es1;
+package com.jogamp.opengl.test.junit.jogl.demos.es1;
import com.jogamp.common.nio.Buffers;
import java.nio.*;
diff --git a/src/junit/com/jogamp/test/junit/jogl/demos/es2/RedSquare0.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquare0.java
index 229635ae5..f062a7375 100644
--- a/src/junit/com/jogamp/test/junit/jogl/demos/es2/RedSquare0.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquare0.java
@@ -25,14 +25,14 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.demos.es2;
+package com.jogamp.opengl.test.junit.jogl.demos.es2;
import com.jogamp.common.nio.Buffers;
import com.jogamp.opengl.util.Animator;
import com.jogamp.opengl.util.GLArrayDataWrapper;
import com.jogamp.opengl.util.PMVMatrix;
-import com.jogamp.test.junit.jogl.demos.es2.shader.RedSquareShader;
-import com.jogamp.test.junit.util.GLSLSimpleProgram;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.shader.RedSquareShader;
+import com.jogamp.opengl.test.junit.util.GLSLSimpleProgram;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.nio.FloatBuffer;
diff --git a/src/junit/com/jogamp/test/junit/jogl/demos/es2/shader/RedSquareShader.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java
index 5a365be11..3ef62df31 100644
--- a/src/junit/com/jogamp/test/junit/jogl/demos/es2/shader/RedSquareShader.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.demos.es2.shader;
+package com.jogamp.opengl.test.junit.jogl.demos.es2.shader;
public class RedSquareShader {
public static String VERTEX_SHADER_TEXT =
diff --git a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/Gears.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/Gears.java
index 432bedbb9..dd28b4e40 100644
--- a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/Gears.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/Gears.java
@@ -1,5 +1,5 @@
-package com.jogamp.test.junit.jogl.demos.gl2.gears;
+package com.jogamp.opengl.test.junit.jogl.demos.gl2.gears;
import javax.media.opengl.*;
diff --git a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java
index 3e7e5988b..d04ce3849 100644
--- a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.demos.gl2.gears;
+package com.jogamp.opengl.test.junit.jogl.demos.gl2.gears;
import javax.media.opengl.*;
import com.jogamp.opengl.util.Animator;
@@ -36,8 +36,8 @@ import com.jogamp.newt.event.awt.AWTWindowAdapter;
import com.jogamp.newt.event.TraceKeyAdapter;
import com.jogamp.newt.event.TraceWindowAdapter;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.util.QuitAdapter;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.QuitAdapter;
import java.awt.Frame;
import org.junit.Assert;
diff --git a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java
index dfb70f61f..40e2ae933 100644
--- a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java
@@ -26,13 +26,13 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.demos.gl2.gears;
+package com.jogamp.opengl.test.junit.jogl.demos.gl2.gears;
import javax.media.opengl.*;
import com.jogamp.opengl.util.FPSAnimator;
import javax.media.opengl.awt.GLJPanel;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.UITestCase;
import java.awt.AWTException;
import java.awt.BorderLayout;
import java.lang.reflect.InvocationTargetException;
diff --git a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java
index d83deea4b..588fe725f 100644
--- a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java
@@ -26,17 +26,17 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.demos.gl2.gears.newt;
+package com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.newt;
import com.jogamp.newt.event.KeyAdapter;
import com.jogamp.newt.event.KeyEvent;
import com.jogamp.newt.opengl.GLWindow;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.util.QuitAdapter;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.QuitAdapter;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;
diff --git a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java
index d0b8cc7de..939a85631 100644
--- a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java
@@ -26,15 +26,15 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.demos.gl2.gears.newt;
+package com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.newt;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.util.QuitAdapter;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+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.Gears;
import com.jogamp.newt.*;
import com.jogamp.newt.event.*;
import com.jogamp.newt.opengl.*;
diff --git a/src/junit/com/jogamp/test/junit/jogl/drawable/TestDrawable01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/drawable/TestDrawable01NEWT.java
index 9b6194ca6..8897dc6fe 100644
--- a/src/junit/com/jogamp/test/junit/jogl/drawable/TestDrawable01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/drawable/TestDrawable01NEWT.java
@@ -26,9 +26,9 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.drawable;
+package com.jogamp.opengl.test.junit.jogl.drawable;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.UITestCase;
import org.junit.Assert;
import org.junit.Before;
diff --git a/src/junit/com/jogamp/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java
index f1b4297e2..ed2f5d3cb 100644
--- a/src/junit/com/jogamp/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java
@@ -26,11 +26,11 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.glsl;
+package com.jogamp.opengl.test.junit.jogl.glsl;
-import com.jogamp.test.junit.jogl.demos.es2.RedSquare0;
-import com.jogamp.test.junit.util.GLSLSimpleProgram;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquare0;
+import com.jogamp.opengl.test.junit.util.GLSLSimpleProgram;
+import com.jogamp.opengl.test.junit.util.UITestCase;
import javax.media.opengl.GLCapabilities;
@@ -43,8 +43,8 @@ import org.junit.Test;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.test.junit.jogl.demos.es2.shader.RedSquareShader;
-import com.jogamp.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.shader.RedSquareShader;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
import java.io.IOException;
import javax.media.opengl.GL2ES2;
diff --git a/src/junit/com/jogamp/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java
index 8da48dccd..be4873ff6 100644
--- a/src/junit/com/jogamp/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java
@@ -1,6 +1,6 @@
-package com.jogamp.test.junit.jogl.glsl;
+package com.jogamp.opengl.test.junit.jogl.glsl;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.UITestCase;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
diff --git a/src/junit/com/jogamp/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java b/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java
index fef0e5ad6..21a97363c 100644
--- a/src/junit/com/jogamp/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java
@@ -26,10 +26,10 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.newt;
+package com.jogamp.opengl.test.junit.jogl.newt;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
-import com.jogamp.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
import java.lang.reflect.InvocationTargetException;
import javax.media.opengl.GLAutoDrawable;
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2File.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2File.java
index b09d27702..95e7d6e53 100644
--- a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2File.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2File.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.offscreen;
+package com.jogamp.opengl.test.junit.jogl.offscreen;
import java.io.IOException;
import javax.media.opengl.*;
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2Screen.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java
index 5d414c708..96a830a53 100644
--- a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2Screen.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.offscreen;
+package com.jogamp.opengl.test.junit.jogl.offscreen;
import java.nio.*;
import javax.media.opengl.*;
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferBase.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferBase.java
index 63215223a..71a73a7e1 100644
--- a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferBase.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferBase.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.offscreen;
+package com.jogamp.opengl.test.junit.jogl.offscreen;
import javax.media.opengl.*;
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferUtil.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferUtil.java
index f10a60a45..d4fa0d654 100644
--- a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferUtil.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferUtil.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.offscreen;
+package com.jogamp.opengl.test.junit.jogl.offscreen;
import com.jogamp.opengl.util.GLBuffers;
import java.nio.*;
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/Surface2File.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/Surface2File.java
index c5d770bb8..6be732a63 100644
--- a/src/junit/com/jogamp/test/junit/jogl/offscreen/Surface2File.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/Surface2File.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.offscreen;
+package com.jogamp.opengl.test.junit.jogl.offscreen;
import javax.media.opengl.*;
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01NEWT.java
index a57ea5777..8851e4f7f 100644
--- a/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.offscreen;
+package com.jogamp.opengl.test.junit.jogl.offscreen;
import com.jogamp.newt.Display;
@@ -46,8 +46,8 @@ import org.junit.Test;
import javax.media.opengl.*;
import javax.media.nativewindow.*;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
import java.io.IOException;
public class TestOffscreen01NEWT extends UITestCase {
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/WindowUtilNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/WindowUtilNEWT.java
index cfe956c61..ba9896d4b 100644
--- a/src/junit/com/jogamp/test/junit/jogl/offscreen/WindowUtilNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/WindowUtilNEWT.java
@@ -26,9 +26,9 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.offscreen;
+package com.jogamp.opengl.test.junit.jogl.offscreen;
-import com.jogamp.test.junit.util.*;
+import com.jogamp.opengl.test.junit.util.*;
import org.junit.Assert;
diff --git a/src/junit/com/jogamp/test/junit/jogl/texture/TestTexture01AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/texture/TestTexture01AWT.java
index 2eb66663c..bd83799d4 100644
--- a/src/junit/com/jogamp/test/junit/jogl/texture/TestTexture01AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/texture/TestTexture01AWT.java
@@ -26,11 +26,11 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.texture;
+package com.jogamp.opengl.test.junit.jogl.texture;
-import com.jogamp.test.junit.jogl.util.texture.gl2.TextureGL2ListenerDraw1;
+import com.jogamp.opengl.test.junit.jogl.util.texture.gl2.TextureGL2ListenerDraw1;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.UITestCase;
import javax.media.opengl.GLProfile;
import javax.media.opengl.GLCapabilities;
diff --git a/src/junit/com/jogamp/test/junit/jogl/util/texture/gl2/TextureGL2ListenerDraw1.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/gl2/TextureGL2ListenerDraw1.java
index a0c0fc7f6..b41dde645 100644
--- a/src/junit/com/jogamp/test/junit/jogl/util/texture/gl2/TextureGL2ListenerDraw1.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/gl2/TextureGL2ListenerDraw1.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.jogl.util.texture.gl2;
+package com.jogamp.opengl.test.junit.jogl.util.texture.gl2;
import com.jogamp.opengl.util.texture.Texture;
import com.jogamp.opengl.util.texture.TextureCoords;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestCloseNewtAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestCloseNewtAWT.java
index 1899a6b81..8cad4f0ed 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestCloseNewtAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestCloseNewtAWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import org.junit.Test;
@@ -45,7 +45,7 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
import com.jogamp.newt.event.WindowAdapter;
import com.jogamp.newt.event.WindowEvent;
import com.jogamp.newt.opengl.GLWindow;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.UITestCase;
public class TestCloseNewtAWT extends UITestCase {
diff --git a/src/junit/com/jogamp/test/junit/newt/TestDisplayLifecycle01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java
index 94f915834..9343e2dd8 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestDisplayLifecycle01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -48,9 +48,9 @@ import com.jogamp.newt.event.*;
import com.jogamp.newt.opengl.*;
import java.io.IOException;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.util.MiscUtils;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestDisplayLifecycle01NEWT extends UITestCase {
static GLProfile glp;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestDisplayLifecycle02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java
index 9fc6e3bc9..d17c5f025 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestDisplayLifecycle02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -48,9 +48,9 @@ import com.jogamp.newt.event.*;
import com.jogamp.newt.opengl.*;
import java.io.IOException;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.util.MiscUtils;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestDisplayLifecycle02NEWT extends UITestCase {
static GLProfile glp;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestEventSourceNotAWTBug.java b/src/test/com/jogamp/opengl/test/junit/newt/TestEventSourceNotAWTBug.java
index ff791b03a..67dd2a33c 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestEventSourceNotAWTBug.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestEventSourceNotAWTBug.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import org.junit.Assert;
import org.junit.Before;
@@ -45,8 +45,8 @@ import javax.swing.WindowConstants;
import com.jogamp.newt.awt.NewtCanvasAWT;
import com.jogamp.newt.opengl.GLWindow;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
-import com.jogamp.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
/**
* This simple program will throw a {@link RuntimeException} when the application is closed.
diff --git a/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java
index d597af889..047df5cf7 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWTRobot.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import org.junit.Assert;
import org.junit.AfterClass;
@@ -51,9 +51,9 @@ import org.junit.Test;
import com.jogamp.newt.awt.NewtCanvasAWT;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.test.junit.util.*;
+import com.jogamp.opengl.test.junit.util.*;
public class TestFocus01SwingAWTRobot extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestFocus02SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java
index b96279cac..15e4c3ad8 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestFocus02SwingAWTRobot.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import java.lang.reflect.*;
@@ -53,8 +53,8 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
import java.io.IOException;
-import com.jogamp.test.junit.util.*;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestFocus02SwingAWTRobot extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestGLWindows00NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java
index 2769dc550..f9571574e 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestGLWindows00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -39,9 +39,9 @@ import com.jogamp.newt.event.*;
import com.jogamp.newt.opengl.*;
import java.io.IOException;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.util.MiscUtils;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
import javax.media.nativewindow.AbstractGraphicsDevice;
public class TestGLWindows00NEWT extends UITestCase {
diff --git a/src/junit/com/jogamp/test/junit/newt/TestGLWindows01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows01NEWT.java
index e2c65adb8..5be97714d 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestGLWindows01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows01NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -39,9 +39,9 @@ import com.jogamp.newt.event.*;
import com.jogamp.newt.opengl.*;
import java.io.IOException;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.util.MiscUtils;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestGLWindows01NEWT extends UITestCase {
static GLProfile glp;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java
index e73181604..6582a96c0 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import org.junit.Assert;
@@ -41,9 +41,9 @@ import com.jogamp.newt.event.*;
import com.jogamp.newt.opengl.*;
import java.io.IOException;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.util.MiscUtils;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestGLWindows02NEWTAnimated extends UITestCase {
static GLProfile glp;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestListenerCom01AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java
index 4407ffef1..b2068d976 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestListenerCom01AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -56,9 +56,9 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
import java.io.IOException;
-import com.jogamp.test.junit.util.*;
-import com.jogamp.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestListenerCom01AWT extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestRemoteGLWindows01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java
index fc5327c9d..96ea861a7 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestRemoteGLWindows01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import org.junit.Assert;
import org.junit.Assume;
@@ -40,8 +40,8 @@ import com.jogamp.newt.*;
import com.jogamp.newt.opengl.*;
import java.io.IOException;
-import com.jogamp.test.junit.util.UITestCase;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.nativewindow.NativeWindowException;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestRemoteWindow01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteWindow01NEWT.java
index bfb012e3c..f0cd3b89f 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestRemoteWindow01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteWindow01NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import org.junit.Assert;
@@ -39,7 +39,7 @@ import javax.media.nativewindow.*;
import com.jogamp.newt.*;
import java.io.IOException;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.UITestCase;
public class TestRemoteWindow01NEWT extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestScreenMode00NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
index 9f39274c5..846013b1d 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestScreenMode00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import java.io.IOException;
import javax.media.nativewindow.NativeWindowFactory;
@@ -45,8 +45,8 @@ import com.jogamp.newt.ScreenMode;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.newt.util.MonitorMode;
import com.jogamp.newt.util.ScreenModeUtil;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
import java.util.Iterator;
import java.util.List;
import javax.media.nativewindow.Capabilities;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestScreenMode01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
index de4def2fa..ffff682dc 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestScreenMode01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import java.io.IOException;
import javax.media.nativewindow.NativeWindowFactory;
@@ -46,8 +46,8 @@ import com.jogamp.newt.Window;
import com.jogamp.newt.ScreenMode;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.newt.util.ScreenModeUtil;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
import java.util.List;
import javax.media.nativewindow.util.Dimension;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestScreenMode02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java
index 011af6330..2ec0490f0 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestScreenMode02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import java.io.IOException;
import javax.media.nativewindow.NativeWindowFactory;
@@ -46,8 +46,8 @@ import com.jogamp.newt.Window;
import com.jogamp.newt.ScreenMode;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.newt.util.ScreenModeUtil;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.UITestCase;
import java.util.List;
import javax.media.nativewindow.util.Dimension;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestWindows01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java
index 033542bea..5ac6041ac 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestWindows01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -45,7 +45,7 @@ import javax.media.nativewindow.*;
import com.jogamp.newt.*;
import java.io.IOException;
-import com.jogamp.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.UITestCase;
public class TestWindows01NEWT extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/WindowEventCom1.java b/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom1.java
index 74b2ed176..609d443aa 100644
--- a/src/junit/com/jogamp/test/junit/newt/WindowEventCom1.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom1.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import com.jogamp.newt.event.*;
diff --git a/src/junit/com/jogamp/test/junit/newt/WindowEventCom2.java b/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom2.java
index 551c84acb..d15a3ccd8 100644
--- a/src/junit/com/jogamp/test/junit/newt/WindowEventCom2.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom2.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import com.jogamp.newt.event.*;
diff --git a/src/junit/com/jogamp/test/junit/newt/WindowEventCom3.java b/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom3.java
index 0c097fc4f..87e5eccbb 100644
--- a/src/junit/com/jogamp/test/junit/newt/WindowEventCom3.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom3.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt;
+package com.jogamp.opengl.test.junit.newt;
import com.jogamp.newt.event.*;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/GLRunnableDummy.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/GLRunnableDummy.java
index 2459c8687..d518616b1 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/GLRunnableDummy.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/GLRunnableDummy.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import org.junit.Assert;
import org.junit.Before;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/KeyAction.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/KeyAction.java
index 4948ce9f4..3313ec65c 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/KeyAction.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/KeyAction.java
@@ -27,7 +27,7 @@
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import com.jogamp.newt.event.*;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java
index 21c0a479c..5173d0f22 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import org.junit.Assert;
@@ -42,9 +42,9 @@ import com.jogamp.newt.opengl.*;
import java.io.IOException;
-import com.jogamp.test.junit.util.*;
-import com.jogamp.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestParenting01NEWT extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01aAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java
index fd52c86a1..424fff0e2 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01aAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -58,9 +58,9 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
import java.io.IOException;
-import com.jogamp.test.junit.util.*;
-import com.jogamp.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestParenting01aAWT extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01bAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01bAWT.java
index 89cefa8b1..2b8d34423 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01bAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01bAWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -58,9 +58,9 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
import java.io.IOException;
-import com.jogamp.test.junit.util.*;
-import com.jogamp.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestParenting01bAWT extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01cAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cAWT.java
index b79f4c57c..7321c6ba2 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01cAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cAWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -57,9 +57,9 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
import java.io.IOException;
-import com.jogamp.test.junit.util.*;
-import com.jogamp.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestParenting01cAWT extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01cSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java
index fb2c74455..1c155f75a 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01cSwingAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import java.lang.reflect.*;
@@ -51,8 +51,8 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
import java.io.IOException;
-import com.jogamp.test.junit.util.*;
-import com.jogamp.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
public class TestParenting01cSwingAWT extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting02AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02AWT.java
index 6c9e5b2b2..20388e295 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting02AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02AWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -56,9 +56,9 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
import java.io.IOException;
-import com.jogamp.test.junit.util.*;
-import com.jogamp.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestParenting02AWT extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java
index 23e3e1c44..b9bd2d93d 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java
@@ -27,7 +27,7 @@
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -51,9 +51,9 @@ import com.jogamp.newt.opengl.*;
import java.io.IOException;
-import com.jogamp.test.junit.util.*;
-import com.jogamp.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestParenting02NEWT extends UITestCase {
static int width, height;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting03AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java
index 00a78a14f..7da30cf18 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting03AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -60,8 +60,8 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
import java.io.IOException;
-import com.jogamp.test.junit.util.*;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestParenting03AWT extends UITestCase {
static Dimension size;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting03bAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java
index 5f42d9f7e..34d95d8ee 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting03bAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -60,8 +60,8 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
import java.io.IOException;
-import com.jogamp.test.junit.util.*;
-import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.util.*;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
public class TestParenting03bAWT extends UITestCase {
static Dimension size;
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/WindowAction.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/WindowAction.java
index bcfb29440..bb4008e57 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/WindowAction.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/WindowAction.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.newt.parenting;
+package com.jogamp.opengl.test.junit.newt.parenting;
import com.jogamp.newt.event.*;
diff --git a/src/junit/com/jogamp/test/junit/util/AWTFocusAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/AWTFocusAdapter.java
index 174152639..a24127772 100644
--- a/src/junit/com/jogamp/test/junit/util/AWTFocusAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTFocusAdapter.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
diff --git a/src/junit/com/jogamp/test/junit/util/AWTKeyAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/AWTKeyAdapter.java
index 8e255acb6..ed09ecd8c 100644
--- a/src/junit/com/jogamp/test/junit/util/AWTKeyAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTKeyAdapter.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
public class AWTKeyAdapter extends java.awt.event.KeyAdapter implements EventCountAdapter {
diff --git a/src/junit/com/jogamp/test/junit/util/AWTMouseAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java
index d78b3ed61..7fa201512 100644
--- a/src/junit/com/jogamp/test/junit/util/AWTMouseAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
public class AWTMouseAdapter extends java.awt.event.MouseAdapter implements EventCountAdapter {
String prefix;
diff --git a/src/junit/com/jogamp/test/junit/util/AWTRobotUtil.java b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
index c49de3e1f..61aa95bf8 100644
--- a/src/junit/com/jogamp/test/junit/util/AWTRobotUtil.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import java.lang.reflect.InvocationTargetException;
import java.awt.AWTException;
diff --git a/src/junit/com/jogamp/test/junit/util/DumpGLInfo.java b/src/test/com/jogamp/opengl/test/junit/util/DumpGLInfo.java
index fd7844f67..d31bf3421 100644
--- a/src/junit/com/jogamp/test/junit/util/DumpGLInfo.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/DumpGLInfo.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import javax.media.opengl.*;
diff --git a/src/junit/com/jogamp/test/junit/util/EventCountAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/EventCountAdapter.java
index e0561218a..105d2503e 100644
--- a/src/junit/com/jogamp/test/junit/util/EventCountAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/EventCountAdapter.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
public interface EventCountAdapter {
diff --git a/src/junit/com/jogamp/test/junit/util/EventCountAdapterUtil.java b/src/test/com/jogamp/opengl/test/junit/util/EventCountAdapterUtil.java
index 40b192a01..d919d7cb6 100644
--- a/src/junit/com/jogamp/test/junit/util/EventCountAdapterUtil.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/EventCountAdapterUtil.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import java.util.List;
import java.util.Iterator;
diff --git a/src/junit/com/jogamp/test/junit/util/GLSLSimpleProgram.java b/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java
index 82be0eb45..bcafc02f7 100644
--- a/src/junit/com/jogamp/test/junit/util/GLSLSimpleProgram.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import com.jogamp.opengl.util.glsl.ShaderUtil;
import java.io.ByteArrayOutputStream;
diff --git a/src/junit/com/jogamp/test/junit/util/MiscUtils.java b/src/test/com/jogamp/opengl/test/junit/util/MiscUtils.java
index bb2abcd87..506fe2d97 100644
--- a/src/junit/com/jogamp/test/junit/util/MiscUtils.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/MiscUtils.java
@@ -27,7 +27,7 @@
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import java.lang.reflect.*;
diff --git a/src/junit/com/jogamp/test/junit/util/NEWTFocusAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/NEWTFocusAdapter.java
index 5cbd9fd15..9ee74aeff 100644
--- a/src/junit/com/jogamp/test/junit/util/NEWTFocusAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/NEWTFocusAdapter.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import com.jogamp.newt.event.WindowAdapter;
import com.jogamp.newt.event.WindowEvent;
diff --git a/src/junit/com/jogamp/test/junit/util/NEWTKeyAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/NEWTKeyAdapter.java
index 73caa1846..ba1a2f3f5 100644
--- a/src/junit/com/jogamp/test/junit/util/NEWTKeyAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/NEWTKeyAdapter.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import com.jogamp.newt.event.KeyAdapter;
import com.jogamp.newt.event.KeyEvent;
diff --git a/src/junit/com/jogamp/test/junit/util/NEWTMouseAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java
index fc5c653f2..617d951ec 100644
--- a/src/junit/com/jogamp/test/junit/util/NEWTMouseAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import com.jogamp.newt.event.MouseAdapter;
import com.jogamp.newt.event.MouseEvent;
diff --git a/src/junit/com/jogamp/test/junit/util/QuitAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/QuitAdapter.java
index 174412295..77996bf1e 100644
--- a/src/junit/com/jogamp/test/junit/util/QuitAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/QuitAdapter.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import com.jogamp.newt.event.*;
diff --git a/src/junit/com/jogamp/test/junit/util/SingletonInstance.java b/src/test/com/jogamp/opengl/test/junit/util/SingletonInstance.java
index 997742cf6..7e3b9ebc0 100644
--- a/src/junit/com/jogamp/test/junit/util/SingletonInstance.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/SingletonInstance.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import java.io.File;
import java.io.IOException;
diff --git a/src/junit/com/jogamp/test/junit/util/UITestCase.java b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
index 8baa716b7..b01ba1be9 100644
--- a/src/junit/com/jogamp/test/junit/util/UITestCase.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
@@ -26,7 +26,7 @@
* or implied, of JogAmp Community.
*/
-package com.jogamp.test.junit.util;
+package com.jogamp.opengl.test.junit.util;
import org.junit.Before;
import org.junit.BeforeClass;
diff --git a/src/test/native/displayMultiple01.c b/src/test/native/displayMultiple01.c
new file mode 100644
index 000000000..d51453687
--- /dev/null
+++ b/src/test/native/displayMultiple01.c
@@ -0,0 +1,18 @@
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <GL/glx.h>
+#include <stdio.h>
+
+int main(int nargs, char **vargs) {
+ int major, minor;
+ Display *disp = XOpenDisplay(NULL);
+ glXQueryVersion(disp, &major, &minor);
+ fprintf(stderr, "%p: %d.%d\n", disp, major, minor);
+ XCloseDisplay(disp);
+ disp = XOpenDisplay(NULL);
+ glXQueryVersion(disp, &major, &minor);
+ fprintf(stderr, "%p: %d.%d\n", disp, major, minor);
+ XCloseDisplay(disp);
+ return 0;
+}
diff --git a/src/test/native/displayMultiple02.c b/src/test/native/displayMultiple02.c
new file mode 100644
index 000000000..1bfe95b95
--- /dev/null
+++ b/src/test/native/displayMultiple02.c
@@ -0,0 +1,113 @@
+/**
+ * compile with: gcc -o displayMultiple02 displayMultiple02.c -lX11 -lGL
+ */
+
+#include <stdio.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <GL/glx.h>
+#include <GL/gl.h>
+
+static void testOrder(int reverseDestroyOrder, const char * msg);
+
+int main(int nargs, char **vargs) {
+ testOrder(0, "Normal order");
+ testOrder(1, "Reverse order");
+ return 0;
+}
+
+static void createGLWin(Display *dpy, int width, int height, Window *rWin, GLXContext *rCtx);
+static void useGL(Display *dpy, Window win, GLXContext ctx, int width, int height);
+
+void testOrder(int reverseDestroyOrder, const char * msg) {
+ int major, minor;
+ Display *disp1;
+ Window win1;
+ GLXContext ctx1;
+
+ Display *disp2;
+ Window win2;
+ GLXContext ctx2;
+
+ fprintf(stderr, "%s: Create #1\n", msg);
+ disp1 = XOpenDisplay(NULL);
+ createGLWin(disp1, 200, 200, &win1, &ctx1);
+ useGL(disp1, win1, ctx1, 200, 200);
+
+ fprintf(stderr, "%s: Create #2\n", msg);
+ disp2 = XOpenDisplay(NULL);
+ createGLWin(disp2, 300, 300, &win2, &ctx2);
+ useGL(disp2, win2, ctx2, 300, 300);
+
+ if(reverseDestroyOrder) {
+ fprintf(stderr, "%s: Destroy #2\n", msg);
+ glXMakeCurrent(disp2, 0, 0);
+ glXDestroyContext(disp2, ctx2);
+ XCloseDisplay(disp2);
+
+ fprintf(stderr, "%s: Destroy #1\n", msg);
+ glXMakeCurrent(disp1, 0, 0);
+ glXDestroyContext(disp1, ctx1);
+ XCloseDisplay(disp1);
+ } else {
+ fprintf(stderr, "%s: Destroy #1\n", msg);
+ glXMakeCurrent(disp1, 0, 0);
+ glXDestroyContext(disp1, ctx1);
+ XCloseDisplay(disp1);
+
+ fprintf(stderr, "%s: Destroy #2\n", msg);
+ glXMakeCurrent(disp2, 0, 0);
+ glXDestroyContext(disp2, ctx2);
+ XCloseDisplay(disp2);
+
+ }
+
+ fprintf(stderr, "%s: Success - no bug\n", msg);
+}
+
+/* attributes for a double buffered visual in RGBA format with at least
+ * 4 bits per color and a 16 bit depth buffer */
+static int attrListDbl[] = { GLX_RGBA, GLX_DOUBLEBUFFER,
+ GLX_RED_SIZE, 4,
+ GLX_GREEN_SIZE, 4,
+ GLX_BLUE_SIZE, 4,
+ GLX_DEPTH_SIZE, 16,
+ None };
+
+void createGLWin(Display *dpy, int width, int height, Window *rWin, GLXContext *rCtx)
+{
+ int screen = DefaultScreen(dpy);
+ XVisualInfo *vi = glXChooseVisual(dpy, screen, attrListDbl);
+ Colormap cmap;
+ XSetWindowAttributes attr;
+
+ /* create a GLX context */
+ *rCtx = glXCreateContext(dpy, vi, 0, GL_TRUE);
+ /* create a color map */
+ cmap = XCreateColormap(dpy, RootWindow(dpy, vi->screen), vi->visual, AllocNone);
+ attr.colormap = cmap;
+ attr.border_pixel = 0;
+
+ /* create a window in window mode*/
+ attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask |
+ StructureNotifyMask;
+ *rWin = XCreateWindow(dpy, RootWindow(dpy, vi->screen),
+ 0, 0, width, height, 0, vi->depth, InputOutput, vi->visual,
+ CWBorderPixel | CWColormap | CWEventMask, &attr);
+
+ XMapRaised(dpy, *rWin);
+}
+
+void useGL(Display *dpy, Window win, GLXContext ctx, int width, int height)
+{
+ glXMakeCurrent(dpy, win, ctx);
+ glShadeModel(GL_SMOOTH);
+ glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+ glClearDepth(1.0f);
+ glViewport(0, 0, width, height);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glXSwapBuffers(dpy, win);
+ glXMakeCurrent(dpy, 0, 0);
+}
+
diff --git a/src/test/native/glExtensionsListGL2.c b/src/test/native/glExtensionsListGL2.c
new file mode 100644
index 000000000..89815e9c0
--- /dev/null
+++ b/src/test/native/glExtensionsListGL2.c
@@ -0,0 +1,95 @@
+/**
+ * compile with: gcc -o displayMultiple02 displayMultiple02.c -lX11 -lGL
+ */
+
+#include <stdio.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <GL/glx.h>
+#include <GL/gl.h>
+
+static void testExtensions();
+
+int main(int nargs, char **vargs) {
+ testExtensions();
+ return 0;
+}
+
+static void createGLWin(Display *dpy, int width, int height, Window *rWin, GLXContext *rCtx);
+static void useGL(Display *dpy, Window win, GLXContext ctx, int width, int height);
+
+void testExtensions() {
+ int major, minor;
+ Display *disp1;
+ Window win1;
+ GLXContext ctx1;
+
+ disp1 = XOpenDisplay(NULL);
+ createGLWin(disp1, 200, 200, &win1, &ctx1);
+ if(0 != win1 && 0 != ctx1) {
+ useGL(disp1, win1, ctx1, 200, 200);
+
+ glXMakeCurrent(disp1, 0, 0);
+ glXDestroyContext(disp1, ctx1);
+ }
+ XCloseDisplay(disp1);
+}
+
+/* attributes for a double buffered visual in RGBA format with at least
+ * 4 bits per color and a 16 bit depth buffer */
+static int attrListDbl[] = { GLX_RGBA, GLX_DOUBLEBUFFER,
+ GLX_RED_SIZE, 4,
+ GLX_GREEN_SIZE, 4,
+ GLX_BLUE_SIZE, 4,
+ GLX_DEPTH_SIZE, 16,
+ None };
+
+void createGLWin(Display *dpy, int width, int height, Window *rWin, GLXContext *rCtx)
+{
+ int screen = DefaultScreen(dpy);
+ XVisualInfo *vi = glXChooseVisual(dpy, screen, attrListDbl);
+ Colormap cmap;
+ XSetWindowAttributes attr;
+
+ /* create a GLX context */
+ *rCtx = glXCreateContext(dpy, vi, 0, GL_TRUE);
+ /* create a color map */
+ cmap = XCreateColormap(dpy, RootWindow(dpy, vi->screen), vi->visual, AllocNone);
+ attr.colormap = cmap;
+ attr.border_pixel = 0;
+
+ /* create a window in window mode*/
+ attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask |
+ StructureNotifyMask;
+ *rWin = XCreateWindow(dpy, RootWindow(dpy, vi->screen),
+ 0, 0, width, height, 0, vi->depth, InputOutput, vi->visual,
+ CWBorderPixel | CWColormap | CWEventMask, &attr);
+
+ XMapRaised(dpy, *rWin);
+}
+
+void useGL(Display *dpy, Window win, GLXContext ctx, int width, int height)
+{
+ PFNGLGETSTRINGIPROC glGetStringi = 0;
+ int i, n;
+
+ glXMakeCurrent(dpy, win, ctx);
+
+ fprintf(stderr, "GL_VENDOR: %s\n", glGetString(GL_VENDOR));
+
+ glGetIntegerv(GL_NUM_EXTENSIONS, &n);
+ fprintf(stderr, "GL_NUM_EXTENSIONS: %d\n", n);
+
+ glGetStringi = (PFNGLGETSTRINGIPROC)glXGetProcAddressARB("glGetStringi");
+ if(NULL==glGetStringi) {
+ return;
+ }
+
+ for (i=0; i<n; i++) {
+ const char* extension = (const char*)glGetStringi(GL_EXTENSIONS, i);
+ fprintf(stderr, "GL_EXTENSION %d/%d: %s\n", (i+1), n, extension);
+ }
+
+}
+
diff --git a/src/test/native/glExtensionsListGL3.c b/src/test/native/glExtensionsListGL3.c
new file mode 100644
index 000000000..c531577e8
--- /dev/null
+++ b/src/test/native/glExtensionsListGL3.c
@@ -0,0 +1,300 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <GL/gl.h>
+#include <GL/glext.h>
+#include <GL/glx.h>
+#include <GL/glxext.h>
+
+typedef int bool;
+#define true 1;
+#define false 0;
+
+// Helper to check for extension string presence. Adapted from:
+// http://www.opengl.org/resources/features/OGLextensions/
+static bool isExtensionSupported(const char *extList, const char *extension)
+{
+
+ const char *start;
+ const char *where, *terminator;
+
+ /* Extension names should not have spaces. */
+ where = strchr(extension, ' ');
+ if ( where || *extension == '\0' )
+ return false;
+
+ /* It takes a bit of care to be fool-proof about parsing the
+ OpenGL extensions string. Don't be fooled by sub-strings,
+ etc. */
+ for ( start = extList; ; ) {
+ where = strstr( start, extension );
+
+ if ( !where )
+ break;
+
+ terminator = where + strlen( extension );
+
+ if ( where == start || *(where - 1) == ' ' )
+ if ( *terminator == ' ' || *terminator == '\0' )
+ return true;
+
+ start = terminator;
+ }
+
+ return false;
+}
+
+static bool ctxErrorOccurred = false;
+static int ctxErrorHandler( Display *dpy, XErrorEvent *ev )
+{
+ ctxErrorOccurred = true;
+ return 0;
+}
+
+void dumpGLExtension() {
+ PFNGLGETSTRINGIPROC glGetStringi = 0;
+ int i, n;
+
+ fprintf(stderr, "GL_VENDOR: %s\n", glGetString(GL_VENDOR));
+
+ glGetIntegerv(GL_NUM_EXTENSIONS, &n);
+ fprintf(stderr, "GL_NUM_EXTENSIONS: %d\n", n);
+
+ glGetStringi = (PFNGLGETSTRINGIPROC)glXGetProcAddressARB("glGetStringi");
+ if(NULL==glGetStringi) {
+ return;
+ }
+
+ for (i=0; i<n; i++) {
+ const char* extension = (const char*)glGetStringi(GL_EXTENSIONS, i);
+ fprintf(stderr, "GL_EXTENSION %d/%d: %s\n", (i+1), n, extension);
+ }
+
+}
+
+int main (int argc, char ** argv)
+{
+ Display *display = XOpenDisplay(0);
+
+ if ( !display )
+ {
+ printf( "Failed to open X display\n" );
+ exit(1);
+ }
+
+ // Get a matching FB config
+ static int visual_attribs[] =
+ {
+ GLX_X_RENDERABLE , True,
+ GLX_DRAWABLE_TYPE , GLX_WINDOW_BIT,
+ GLX_RENDER_TYPE , GLX_RGBA_BIT,
+ GLX_X_VISUAL_TYPE , GLX_TRUE_COLOR,
+ GLX_RED_SIZE , 8,
+ GLX_GREEN_SIZE , 8,
+ GLX_BLUE_SIZE , 8,
+ GLX_ALPHA_SIZE , 8,
+ GLX_DEPTH_SIZE , 24,
+ GLX_STENCIL_SIZE , 8,
+ GLX_DOUBLEBUFFER , True,
+ //GLX_SAMPLE_BUFFERS , 1,
+ //GLX_SAMPLES , 4,
+ None
+ };
+
+ int glx_major, glx_minor;
+
+ // FBConfigs were added in GLX version 1.3.
+ if ( !glXQueryVersion( display, &glx_major, &glx_minor ) ||
+ ( ( glx_major == 1 ) && ( glx_minor < 3 ) ) || ( glx_major < 1 ) )
+ {
+ printf( "Invalid GLX version" );
+ exit(1);
+ }
+
+ printf( "Getting matching framebuffer configs\n" );
+ int fbcount;
+ GLXFBConfig *fbc = glXChooseFBConfig( display, DefaultScreen( display ),
+ visual_attribs, &fbcount );
+ if ( !fbc )
+ {
+ printf( "Failed to retrieve a framebuffer config\n" );
+ exit(1);
+ }
+ printf( "Found %d matching FB configs.\n", fbcount );
+
+ // Pick the FB config/visual with the most samples per pixel
+ printf( "Getting XVisualInfos\n" );
+ int best_fbc = -1, worst_fbc = -1, best_num_samp = -1, worst_num_samp = 999;
+
+ int i;
+ for ( i = 0; i < fbcount; i++ )
+ {
+ XVisualInfo *vi = glXGetVisualFromFBConfig( display, fbc[i] );
+ if ( vi )
+ {
+ int samp_buf, samples;
+ glXGetFBConfigAttrib( display, fbc[i], GLX_SAMPLE_BUFFERS, &samp_buf );
+ glXGetFBConfigAttrib( display, fbc[i], GLX_SAMPLES , &samples );
+
+ printf( " Matching fbconfig %d, visual ID 0x%2x: SAMPLE_BUFFERS = %d,"
+ " SAMPLES = %d\n",
+ (int)i, (int)( vi -> visualid), samp_buf, samples );
+
+ if ( best_fbc < 0 || samp_buf && samples > best_num_samp )
+ best_fbc = i, best_num_samp = samples;
+ if ( worst_fbc < 0 || !samp_buf || samples < worst_num_samp )
+ worst_fbc = i, worst_num_samp = samples;
+ }
+ XFree( vi );
+ }
+
+ GLXFBConfig bestFbc = fbc[ best_fbc ];
+
+ // Be sure to free the FBConfig list allocated by glXChooseFBConfig()
+ XFree( fbc );
+
+ // Get a visual
+ XVisualInfo *vi = glXGetVisualFromFBConfig( display, bestFbc );
+ printf( "Chosen visual ID = 0x%x\n", (int) vi->visualid );
+
+ printf( "Creating colormap\n" );
+ XSetWindowAttributes swa;
+ Colormap cmap;
+ swa.colormap = cmap = XCreateColormap( display,
+ RootWindow( display, vi->screen ),
+ vi->visual, AllocNone );
+ swa.background_pixmap = None ;
+ swa.border_pixel = 0;
+ swa.event_mask = StructureNotifyMask;
+
+ printf( "Creating window\n" );
+ Window win = XCreateWindow( display, RootWindow( display, vi->screen ),
+ 0, 0, 100, 100, 0, vi->depth, InputOutput,
+ vi->visual,
+ CWBorderPixel|CWColormap|CWEventMask, &swa );
+ if ( !win )
+ {
+ printf( "Failed to create window.\n" );
+ exit(1);
+ }
+
+ // Done with the visual info data
+ XFree( vi );
+
+ XStoreName( display, win, "GL 3.0 Window" );
+
+ printf( "Mapping window\n" );
+ XMapWindow( display, win );
+
+ // Get the default screen's GLX extension list
+ const char *glxExts = glXQueryExtensionsString( display,
+ DefaultScreen( display ) );
+
+ // NOTE: It is not necessary to create or make current to a context before
+ // calling glXGetProcAddressARB
+ PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = 0;
+ glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)
+ glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB" );
+
+ GLXContext ctx = 0;
+
+ // Install an X error handler so the application won't exit if GL 3.0
+ // context allocation fails.
+ //
+ // Note this error handler is global. All display connections in all threads
+ // of a process use the same error handler, so be sure to guard against other
+ // threads issuing X commands while this code is running.
+ ctxErrorOccurred = false;
+ int (*oldHandler)(Display*, XErrorEvent*) =
+ XSetErrorHandler(&ctxErrorHandler);
+
+ // Check for the GLX_ARB_create_context extension string and the function.
+ // If either is not present, use GLX 1.3 context creation method.
+ if ( !isExtensionSupported( glxExts, "GLX_ARB_create_context" ) ||
+ !glXCreateContextAttribsARB )
+ {
+ printf( "glXCreateContextAttribsARB() not found"
+ " ... using old-style GLX context\n" );
+ ctx = glXCreateNewContext( display, bestFbc, GLX_RGBA_TYPE, 0, True );
+ }
+
+ // If it does, try to get a GL 3.0 context!
+ else
+ {
+ int context_attribs[] =
+ {
+ GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
+ GLX_CONTEXT_MINOR_VERSION_ARB, 0,
+ GLX_RENDER_TYPE , GLX_RGBA_TYPE,
+ GLX_CONTEXT_FLAGS_ARB , GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
+ None
+ };
+
+ printf( "Creating context\n" );
+ ctx = glXCreateContextAttribsARB( display, bestFbc, 0,
+ True, context_attribs );
+
+ // Sync to ensure any errors generated are processed.
+ XSync( display, False );
+ if ( !ctxErrorOccurred && ctx ) {
+ printf( "Created GL 3.0 context\n" );
+ } else
+ {
+ // Couldn't create GL 3.0 context. Fall back to old-style 2.x context.
+ // When a context version below 3.0 is requested, implementations will
+ // return the newest context version compatible with OpenGL versions less
+ // than version 3.0.
+ // GLX_CONTEXT_MAJOR_VERSION_ARB = 1
+ context_attribs[1] = 1;
+ // GLX_CONTEXT_MINOR_VERSION_ARB = 0
+ context_attribs[3] = 0;
+
+ ctxErrorOccurred = false;
+
+ printf( "Failed to create GL 3.0 context"
+ " ... using old-style GLX context\n" );
+ ctx = glXCreateContextAttribsARB( display, bestFbc, 0,
+ True, context_attribs );
+ }
+ }
+
+ // Sync to ensure any errors generated are processed.
+ XSync( display, False );
+
+ // Restore the original error handler
+ XSetErrorHandler( oldHandler );
+
+ if ( ctxErrorOccurred || !ctx )
+ {
+ printf( "Failed to create an OpenGL context\n" );
+ exit(1);
+ }
+
+ // Verifying that context is a direct context
+ if ( ! glXIsDirect ( display, ctx ) )
+ {
+ printf( "Indirect GLX rendering context obtained\n" );
+ }
+ else
+ {
+ printf( "Direct GLX rendering context obtained\n" );
+ }
+
+ printf( "Making context current\n" );
+ glXMakeCurrent( display, win, ctx );
+
+ dumpGLExtension();
+
+ glXMakeCurrent( display, 0, 0 );
+ glXDestroyContext( display, ctx );
+
+ XDestroyWindow( display, win );
+ XFreeColormap( display, cmap );
+ XCloseDisplay( display );
+
+ return 0;
+}
+
diff --git a/src/test/native/make.sh b/src/test/native/make.sh
new file mode 100755
index 000000000..20bd49e4a
--- /dev/null
+++ b/src/test/native/make.sh
@@ -0,0 +1,6 @@
+#! /bin/bash
+
+gcc -o displayMultiple01 displayMultiple01.c -lX11 -lGL
+gcc -o displayMultiple02 displayMultiple02.c -lX11 -lGL
+gcc -o glExtensionsListGL2 glExtensionsListGL2.c -lX11 -lGL
+gcc -o glExtensionsListGL3 glExtensionsListGL3.c -lX11 -lGL