From ebfb837b95fc6eb6ec9102004d1d068933957400 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 13 Dec 2010 03:22:08 +0100 Subject: tests: test.auto.run (junit.run) and test.manual.run --- .../jogamp/opengl/test/bugs/Bug427GLJPanel.java | 72 ---------------------- .../opengl/test/bugs/Bug427GLJPanelTest1.java | 72 ++++++++++++++++++++++ 2 files changed, 72 insertions(+), 72 deletions(-) delete mode 100644 src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanel.java create mode 100644 src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java (limited to 'src/test/com/jogamp') diff --git a/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanel.java b/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanel.java deleted file mode 100644 index 378952b59..000000000 --- a/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanel.java +++ /dev/null @@ -1,72 +0,0 @@ -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/Bug427GLJPanelTest1.java b/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java new file mode 100644 index 000000000..ceee2c876 --- /dev/null +++ b/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.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 Bug427GLJPanelTest1 extends JFrame implements GLEventListener { + + public Bug427GLJPanelTest1() { + super("Bug427GLJPanelTest1"); + + 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) { + Bug427GLJPanelTest1 demo = new Bug427GLJPanelTest1(); + 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) { + } +} -- cgit v1.2.3