Skip to content

Commit

Permalink
Refine test cases for synchronous GLAutoDrawable display, swap-buffer…
Browse files Browse the repository at this point in the history
… and read-pixels (non-MSAA and MSAA) Bugs: 841, 975 and 1020

.. add Platform and GL info !
  • Loading branch information
sgothel committed Aug 30, 2014
1 parent 701e1e8 commit 33072c5
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
Expand Up @@ -31,7 +31,10 @@
import java.awt.Dimension;
import java.awt.Frame;

import javax.media.opengl.GL;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilitiesImmutable;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import javax.swing.SwingUtilities;
Expand All @@ -41,6 +44,8 @@
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;

import com.jogamp.common.util.VersionUtil;
import com.jogamp.opengl.JoglVersion;
import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
import com.jogamp.opengl.test.junit.jogl.demos.es2.MultisampleDemoES2;
import com.jogamp.opengl.test.junit.util.MiscUtils;
Expand Down Expand Up @@ -83,6 +88,23 @@ public void run() {
// panel.setDoubleBuffered(useSwingDoubleBuffer);
// frame.getContentPane().add(panel);

glad.addGLEventListener(new GLEventListener() {
@Override
public void init(final GLAutoDrawable drawable) {
final GL gl = drawable.getGL();
System.err.println(VersionUtil.getPlatformInfo());
System.err.println("GLEventListener init on "+Thread.currentThread());
System.err.println("Chosen GLCapabilities: " + drawable.getChosenGLCapabilities());
System.err.println("INIT GL IS: " + gl.getClass().getName());
System.err.println(JoglVersion.getGLStrings(gl, null, false).toString());
}
@Override
public void dispose(final GLAutoDrawable drawable) {}
@Override
public void display(final GLAutoDrawable drawable) {}
@Override
public void reshape(final GLAutoDrawable drawable, final int x,final int y, final int width, final int height) {}
});
{
final GearsES2 gears = new GearsES2(1);
gears.setVerbose(false);
Expand Down
Expand Up @@ -30,7 +30,10 @@
import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.media.opengl.GL;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilitiesImmutable;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLJPanel;
import javax.swing.JFrame;
Expand All @@ -42,6 +45,9 @@
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;

import com.jogamp.common.GlueGenVersion;
import com.jogamp.common.util.VersionUtil;
import com.jogamp.opengl.JoglVersion;
import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
import com.jogamp.opengl.test.junit.jogl.demos.es2.MultisampleDemoES2;
import com.jogamp.opengl.test.junit.util.MiscUtils;
Expand Down Expand Up @@ -80,6 +86,23 @@ public void run() {
panel.setDoubleBuffered(useSwingDoubleBuffer);
frame.getContentPane().add(panel);

glad.addGLEventListener(new GLEventListener() {
@Override
public void init(final GLAutoDrawable drawable) {
final GL gl = drawable.getGL();
System.err.println(VersionUtil.getPlatformInfo());
System.err.println("GLEventListener init on "+Thread.currentThread());
System.err.println("Chosen GLCapabilities: " + drawable.getChosenGLCapabilities());
System.err.println("INIT GL IS: " + gl.getClass().getName());
System.err.println(JoglVersion.getGLStrings(gl, null, false).toString());
}
@Override
public void dispose(final GLAutoDrawable drawable) {}
@Override
public void display(final GLAutoDrawable drawable) {}
@Override
public void reshape(final GLAutoDrawable drawable, final int x,final int y, final int width, final int height) {}
});
{
final GearsES2 gears = new GearsES2(1);
gears.setFlipVerticalInGLOrientation(skipGLOrientationVerticalFlip);
Expand Down
Expand Up @@ -42,7 +42,9 @@
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;

import com.jogamp.common.util.VersionUtil;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.opengl.JoglVersion;
import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
import com.jogamp.opengl.test.junit.jogl.demos.es2.MultisampleDemoES2;
import com.jogamp.opengl.test.junit.util.MiscUtils;
Expand Down Expand Up @@ -78,6 +80,23 @@ public void test(final GLCapabilitiesImmutable caps, final boolean useSwingDoubl
try {
glad.setPosition(64, 64);
glad.setSize(320, 240);
glad.addGLEventListener(new GLEventListener() {
@Override
public void init(final GLAutoDrawable drawable) {
final GL gl = drawable.getGL();
System.err.println(VersionUtil.getPlatformInfo());
System.err.println("GLEventListener init on "+Thread.currentThread());
System.err.println("Chosen GLCapabilities: " + drawable.getChosenGLCapabilities());
System.err.println("INIT GL IS: " + gl.getClass().getName());
System.err.println(JoglVersion.getGLStrings(gl, null, false).toString());
}
@Override
public void dispose(final GLAutoDrawable drawable) {}
@Override
public void display(final GLAutoDrawable drawable) {}
@Override
public void reshape(final GLAutoDrawable drawable, final int x,final int y, final int width, final int height) {}
});
{
final GearsES2 gears = new GearsES2(1);
gears.setVerbose(false);
Expand Down

0 comments on commit 33072c5

Please sign in to comment.