From 33072c51e7bd1270477f7d4abe817f3565e10546 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Sat, 30 Aug 2014 20:32:56 +0200
Subject: Refine test cases for synchronous GLAutoDrawable display, swap-buffer
 and read-pixels (non-MSAA and MSAA) Bugs: 841, 975 and 1020

.. add Platform and GL info !
---
 .../jogl/acore/TestGLReadBuffer01GLCanvasAWT.java  | 22 +++++++++++++++++++++
 .../jogl/acore/TestGLReadBuffer01GLJPanelAWT.java  | 23 ++++++++++++++++++++++
 .../jogl/acore/TestGLReadBuffer01GLWindowNEWT.java | 19 ++++++++++++++++++
 3 files changed, 64 insertions(+)

(limited to 'src/test/com')

diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLCanvasAWT.java
index b2291e5f5..37f1c7555 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLCanvasAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLCanvasAWT.java
@@ -31,7 +31,10 @@ import java.awt.BorderLayout;
 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;
@@ -41,6 +44,8 @@ import org.junit.BeforeClass;
 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;
@@ -83,6 +88,23 @@ public class TestGLReadBuffer01GLCanvasAWT extends GLReadBuffer00BaseAWT {
                     // 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);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLJPanelAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLJPanelAWT.java
index e862e46e2..fd2ac6833 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLJPanelAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLJPanelAWT.java
@@ -30,7 +30,10 @@ package com.jogamp.opengl.test.junit.jogl.acore;
 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;
@@ -42,6 +45,9 @@ import org.junit.BeforeClass;
 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;
@@ -80,6 +86,23 @@ public class TestGLReadBuffer01GLJPanelAWT extends GLReadBuffer00BaseAWT {
                     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);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java
index 57a571ba9..4da73dbca 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java
@@ -42,7 +42,9 @@ import org.junit.BeforeClass;
 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;
@@ -78,6 +80,23 @@ public class TestGLReadBuffer01GLWindowNEWT extends GLReadBuffer00Base {
         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);
-- 
cgit v1.2.3