aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-06-24 06:53:05 +0200
committerSven Gothel <[email protected]>2013-06-24 06:53:05 +0200
commit3e528a69db38711c789a08d1d7335e5a7739f780 (patch)
treebbe32ca3a89dd1f154fa3198a057438bca1d427c /src/test
parente5dd5757379353a9dd10248136afef65c33f6420 (diff)
TestGearsES2GLJPanel*: Use GearsES1 is using bitmap - On Windows GDI would be returned!
We still have to solve the GL renderer selection / probing problem, i.e. in such cases we don't know before context realization which GL renderer we actually receive.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java7
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelsAWT.java18
2 files changed, 20 insertions, 5 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java
index 3484ffa1d..f15065525 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java
@@ -49,6 +49,7 @@ import com.jogamp.newt.event.TraceKeyAdapter;
import com.jogamp.newt.event.TraceWindowAdapter;
import com.jogamp.newt.event.awt.AWTKeyAdapter;
import com.jogamp.newt.event.awt.AWTWindowAdapter;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.GearsES1;
import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
import com.jogamp.opengl.test.junit.util.MiscUtils;
import com.jogamp.opengl.test.junit.util.QuitAdapter;
@@ -103,7 +104,11 @@ public class TestGearsES2GLJPanelAWT extends UITestCase {
glJPanel.setMinimumSize(wsize);
glJPanel.setPreferredSize(wsize);
glJPanel.setSize(wsize);
- glJPanel.addGLEventListener(new GearsES2(swapInterval));
+ if( caps.isBitmap() ) {
+ glJPanel.addGLEventListener(new GearsES1(swapInterval));
+ } else {
+ glJPanel.addGLEventListener(new GearsES2(swapInterval));
+ }
final SnapshotGLEventListener snap = new SnapshotGLEventListener();
glJPanel.addGLEventListener(snap);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelsAWT.java
index 54dfe6726..2fb30a7ed 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelsAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelsAWT.java
@@ -40,6 +40,7 @@ import java.nio.FloatBuffer;
import javax.media.opengl.GLAnimatorControl;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLJPanel;
import javax.swing.JComponent;
@@ -54,6 +55,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
import com.jogamp.common.nio.Buffers;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.GearsES1;
import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
import com.jogamp.opengl.test.junit.util.MiscUtils;
import com.jogamp.opengl.test.junit.util.QuitAdapter;
@@ -118,10 +120,18 @@ public class TestGearsES2GLJPanelsAWT extends UITestCase {
if ( !useInterPanel ) {
canvas.setBounds(x, y, w, h);
}
- GearsES2 demo = new GearsES2(swapInterval);
- demo.setIgnoreFocus(true);
- demo.setGearsColors(color, color, color);
- demo.setClearColor(clearColor);
+ final GLEventListener demo;
+ if( caps.isBitmap() ) {
+ GearsES1 gdemo = new GearsES1(swapInterval);
+ gdemo.setGearsColors(color, color, color);
+ demo = gdemo;
+ } else {
+ GearsES2 gdemo = new GearsES2(swapInterval);
+ gdemo.setIgnoreFocus(true);
+ gdemo.setGearsColors(color, color, color);
+ gdemo.setClearColor(clearColor);
+ demo = gdemo;
+ }
canvas.addGLEventListener(demo);
if( null != anim ) {
anim.add(canvas);