summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmake/scripts/tests.sh4
-rw-r--r--src/newt/classes/jogamp/newt/ScreenImpl.java42
-rw-r--r--src/newt/classes/jogamp/newt/driver/android/AndroidScreen.java9
-rw-r--r--src/newt/classes/jogamp/newt/driver/awt/AWTScreen.java26
-rw-r--r--src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java6
-rw-r--r--src/newt/classes/jogamp/newt/driver/broadcom/egl/Screen.java13
-rw-r--r--src/newt/classes/jogamp/newt/driver/intel/gdl/Screen.java12
-rw-r--r--src/newt/classes/jogamp/newt/driver/kd/KDScreen.java19
-rw-r--r--src/newt/classes/jogamp/newt/driver/kd/KDWindow.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/macosx/MacScreen.java7
-rw-r--r--src/newt/classes/jogamp/newt/driver/windows/WindowsScreen.java9
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/X11Screen.java15
-rw-r--r--src/newt/native/X11Screen.c4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java7
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java12
15 files changed, 115 insertions, 72 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 8b3d7e47c..26bd0b329 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -188,7 +188,7 @@ function testswt() {
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestGearsES1NEWT $*
#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
+testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestRedSquareES1NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestRedSquareES2NEWT $*
#testnoawt com.jogamp.opengl.test.junit.newt.TestWindows01NEWT $*
@@ -199,7 +199,7 @@ function testswt() {
#testnoawt com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle02NEWT
#testnoawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT $*
#testnoawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting02NEWT $*
-testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode00NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode00NEWT $*
#testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode00bNEWT
#testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode01NEWT
#testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode01bNEWT
diff --git a/src/newt/classes/jogamp/newt/ScreenImpl.java b/src/newt/classes/jogamp/newt/ScreenImpl.java
index 3c46814d2..a8e6e68bd 100644
--- a/src/newt/classes/jogamp/newt/ScreenImpl.java
+++ b/src/newt/classes/jogamp/newt/ScreenImpl.java
@@ -178,6 +178,7 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
throw new NativeWindowException("Screen.createNative() failed to instanciate an AbstractGraphicsScreen");
}
initScreenModeStatus();
+ updateScreenSize();
if(DEBUG) {
System.err.println("Screen.createNative() END ("+DisplayImpl.getThreadName()+", "+this+")");
}
@@ -240,20 +241,36 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
protected abstract void createNativeImpl();
protected abstract void closeNativeImpl();
+
+ /**
+ * Returns the validated screen index, which is either the passed <code>idx</code>
+ * value or <code>0</code>.
+ * <p>
+ * On big-desktops this shall return always 0.
+ * </p>
+ */
protected abstract int validateScreenIndex(int idx);
+ /**
+ * Returns the <b>rotated</b> virtual ScreenSize.
+ * <p>
+ * This method is called after the ScreenMode has been set,
+ * hence you may utilize it.
+ * </p>
+ */
+ protected abstract DimensionImmutable getNativeScreenSizeImpl();
+
public final String getFQName() {
return fqname;
}
/**
- * Set the <b>rotated</b> ScreenSize.
- * @see com.jogamp.newt.ScreenMode#getRotatedWidth()
- * @see com.jogamp.newt.ScreenMode#getRotatedHeight()
+ * Updates the <b>rotated</b> virtual ScreenSize using the native impl.
*/
- protected void setScreenSize(int w, int h) {
- System.err.println("Detected screen size "+w+"x"+h);
- width=w; height=h;
+ protected void updateScreenSize() {
+ final DimensionImmutable dim = getNativeScreenSizeImpl();
+ width=dim.getWidth(); height=dim.getHeight();
+ System.err.println("Detected screen size "+width+"x"+height);
}
public final Display getDisplay() {
@@ -274,16 +291,14 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
/**
- * @return the <b>rotated</b> width.
- * @see com.jogamp.newt.ScreenMode#getRotatedWidth()
+ * @return the <b>rotated</b> virtual width.
*/
public final int getWidth() {
return (usrWidth>0) ? usrWidth : (width>0) ? width : 480;
}
/**
- * @return the <b>rotated</b> height
- * @see com.jogamp.newt.ScreenMode#getRotatedHeight()
+ * @return the <b>rotated</b> virtual height.
*/
public final int getHeight() {
return (usrHeight>0) ? usrHeight : (height>0) ? height : 480;
@@ -361,9 +376,6 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
}
success = setCurrentScreenModeImpl(smU);
- if(success) {
- setScreenSize(smU.getRotatedWidth(), smU.getRotatedHeight());
- }
if(DEBUG) {
t1 = System.currentTimeMillis() - t1;
@@ -391,7 +403,7 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
public void screenModeChanged(ScreenMode sm, boolean success) {
if(success) {
- setScreenSize(sm.getRotatedWidth(), sm.getRotatedHeight());
+ updateScreenSize();
}
for(int i=0; i<referencedScreenModeListener.size(); i++) {
((ScreenModeListener)referencedScreenModeListener.get(i)).screenModeChanged(sm, success);
@@ -502,8 +514,6 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
if(null == currentSM) {
throw new InternalError("getCurrentScreenModeImpl() == null");
}
- // Update rotated Screen size, since native RandR impl. is more correct.
- setScreenSize(currentSM.getRotatedWidth(), currentSM.getRotatedHeight());
ArrayHashSet<ScreenMode> screenModes = collectNativeScreenModes(screenModesIdx2NativeIdx);
if(screenModes.size()==0) {
diff --git a/src/newt/classes/jogamp/newt/driver/android/AndroidScreen.java b/src/newt/classes/jogamp/newt/driver/android/AndroidScreen.java
index 79bf744fe..f403bc425 100644
--- a/src/newt/classes/jogamp/newt/driver/android/AndroidScreen.java
+++ b/src/newt/classes/jogamp/newt/driver/android/AndroidScreen.java
@@ -29,6 +29,8 @@
package jogamp.newt.driver.android;
import javax.media.nativewindow.*;
+import javax.media.nativewindow.util.Dimension;
+import javax.media.nativewindow.util.DimensionImmutable;
import com.jogamp.newt.ScreenMode;
import com.jogamp.newt.util.ScreenModeUtil;
@@ -78,6 +80,11 @@ public class AndroidScreen extends jogamp.newt.ScreenImpl {
return 0; // FIXME: only one screen available ?
}
+ protected DimensionImmutable getNativeScreenSizeImpl() {
+ final ScreenMode sm = getCurrentScreenMode();
+ return new Dimension(sm.getRotatedWidth(), sm.getRotatedHeight());
+ }
+
//----------------------------------------------------------------------
// Internals only
//
@@ -95,7 +102,7 @@ public class AndroidScreen extends jogamp.newt.ScreenImpl {
if (ScreenMode.ROTATE_90 == nrot || ScreenMode.ROTATE_270 == nrot) {
props[offset++] = outMetrics.heightPixels;
props[offset++] = outMetrics.widthPixels;
- } else {
+ } else {
props[offset++] = outMetrics.widthPixels;
props[offset++] = outMetrics.heightPixels;
}
diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTScreen.java b/src/newt/classes/jogamp/newt/driver/awt/AWTScreen.java
index a8aa2844d..e2e0105eb 100644
--- a/src/newt/classes/jogamp/newt/driver/awt/AWTScreen.java
+++ b/src/newt/classes/jogamp/newt/driver/awt/AWTScreen.java
@@ -38,6 +38,8 @@ import java.awt.DisplayMode;
import jogamp.newt.ScreenImpl;
import javax.media.nativewindow.awt.AWTGraphicsDevice;
import javax.media.nativewindow.awt.AWTGraphicsScreen;
+import javax.media.nativewindow.util.Dimension;
+import javax.media.nativewindow.util.DimensionImmutable;
public class AWTScreen extends ScreenImpl {
public AWTScreen() {
@@ -45,26 +47,32 @@ public class AWTScreen extends ScreenImpl {
protected void createNativeImpl() {
aScreen = new AWTGraphicsScreen((AWTGraphicsDevice)display.getGraphicsDevice());
-
- final DisplayMode mode = ((AWTGraphicsDevice)getDisplay().getGraphicsDevice()).getGraphicsDevice().getDisplayMode();
- if(null != mode) {
- setScreenSize(mode.getWidth(), mode.getHeight());
- }
}
protected void setAWTGraphicsScreen(AWTGraphicsScreen s) {
aScreen = s;
}
- // done by AWTWindow ..
- protected void setScreenSize(int w, int h) {
- super.setScreenSize(w, h);
+ /**
+ * Used by AWTWindow ..
+ */
+ @Override
+ protected void updateScreenSize() {
+ super.updateScreenSize();
}
protected void closeNativeImpl() { }
protected int validateScreenIndex(int idx) {
- return idx; // FIXME: ???
+ return idx; // pass through ...
}
+
+ protected DimensionImmutable getNativeScreenSizeImpl() {
+ final DisplayMode mode = ((AWTGraphicsDevice)getDisplay().getGraphicsDevice()).getGraphicsDevice().getDisplayMode();
+ if(null != mode) {
+ return new Dimension(mode.getWidth(), mode.getHeight());
+ }
+ return null;
+ }
}
diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java b/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java
index 1cd98b068..5b6fcedbe 100644
--- a/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java
+++ b/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java
@@ -36,7 +36,6 @@ package jogamp.newt.driver.awt;
import java.awt.BorderLayout;
import java.awt.Container;
-import java.awt.DisplayMode;
import java.awt.Frame;
import java.awt.Insets;
@@ -157,10 +156,7 @@ public class AWTWindow extends WindowImpl {
((AWTScreen)getScreen()).setAWTGraphicsScreen((AWTGraphicsScreen)cfg.getScreen());
((AWTDisplay)getScreen().getDisplay()).setAWTGraphicsDevice((AWTGraphicsDevice)cfg.getScreen().getDevice());
- final DisplayMode mode = ((AWTGraphicsDevice)cfg.getScreen().getDevice()).getGraphicsDevice().getDisplayMode();
- if(null != mode) {
- ((AWTScreen)getScreen()).setScreenSize(mode.getWidth(), mode.getHeight());
- }
+ ((AWTScreen)getScreen()).updateScreenSize();
}
return res;
}
diff --git a/src/newt/classes/jogamp/newt/driver/broadcom/egl/Screen.java b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Screen.java
index 9d96ac5d6..850f56c6d 100644
--- a/src/newt/classes/jogamp/newt/driver/broadcom/egl/Screen.java
+++ b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Screen.java
@@ -34,6 +34,8 @@
package jogamp.newt.driver.broadcom.egl;
import javax.media.nativewindow.*;
+import javax.media.nativewindow.util.Dimension;
+import javax.media.nativewindow.util.DimensionImmutable;
public class Screen extends jogamp.newt.ScreenImpl {
@@ -47,7 +49,6 @@ public class Screen extends jogamp.newt.ScreenImpl {
protected void createNativeImpl() {
aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
- setScreenSize(fixedWidth, fixedHeight);
}
protected void closeNativeImpl() { }
@@ -55,12 +56,16 @@ public class Screen extends jogamp.newt.ScreenImpl {
protected int validateScreenIndex(int idx) {
return 0; // only one screen available
}
-
+
+ protected DimensionImmutable getNativeScreenSizeImpl() {
+ return new Dimension(fixedWidth, fixedHeight); // FIXME
+ }
+
//----------------------------------------------------------------------
// Internals only
//
- static final int fixedWidth = 1920;
- static final int fixedHeight = 1080;
+ private static final int fixedWidth = 1920; // FIXME
+ private static final int fixedHeight = 1080; // FIXME
}
diff --git a/src/newt/classes/jogamp/newt/driver/intel/gdl/Screen.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/Screen.java
index 62d9da4ed..6e156183f 100644
--- a/src/newt/classes/jogamp/newt/driver/intel/gdl/Screen.java
+++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/Screen.java
@@ -35,6 +35,8 @@ package jogamp.newt.driver.intel.gdl;
import jogamp.newt.*;
import javax.media.nativewindow.*;
+import javax.media.nativewindow.util.Dimension;
+import javax.media.nativewindow.util.DimensionImmutable;
public class Screen extends jogamp.newt.ScreenImpl {
@@ -57,6 +59,10 @@ public class Screen extends jogamp.newt.ScreenImpl {
return 0; // only one screen available
}
+ protected DimensionImmutable getNativeScreenSizeImpl() {
+ return new Dimension(cachedWidth, cachedHeight);
+ }
+
//----------------------------------------------------------------------
// Internals only
//
@@ -66,7 +72,11 @@ public class Screen extends jogamp.newt.ScreenImpl {
// called by GetScreenInfo() ..
private void screenCreated(int width, int height) {
- setScreenSize(width, height);
+ cachedWidth = width;
+ cachedHeight = height;
}
+
+ private static int cachedWidth = 0;
+ private static int cachedHeight = 0;
}
diff --git a/src/newt/classes/jogamp/newt/driver/kd/KDScreen.java b/src/newt/classes/jogamp/newt/driver/kd/KDScreen.java
index 0bfe8a622..bbfef370c 100644
--- a/src/newt/classes/jogamp/newt/driver/kd/KDScreen.java
+++ b/src/newt/classes/jogamp/newt/driver/kd/KDScreen.java
@@ -35,6 +35,8 @@ package jogamp.newt.driver.kd;
import jogamp.newt.ScreenImpl;
import javax.media.nativewindow.*;
+import javax.media.nativewindow.util.Dimension;
+import javax.media.nativewindow.util.DimensionImmutable;
public class KDScreen extends ScreenImpl {
static {
@@ -50,12 +52,19 @@ public class KDScreen extends ScreenImpl {
protected void closeNativeImpl() { }
- // elevate access to this package ..
- protected void setScreenSize(int w, int h) {
- super.setScreenSize(w, h);
- }
-
protected int validateScreenIndex(int idx) {
return 0; // only one screen available
}
+
+ protected DimensionImmutable getNativeScreenSizeImpl() {
+ return new Dimension(cachedWidth, cachedHeight);
+ }
+
+ protected void sizeChanged(int w, int h) {
+ cachedWidth = w;
+ cachedHeight = h;
+ }
+
+ private static int cachedWidth = 0;
+ private static int cachedHeight = 0;
}
diff --git a/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java b/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java
index 0c720e559..92f8251bc 100644
--- a/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java
+++ b/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java
@@ -146,7 +146,7 @@ public class KDWindow extends WindowImpl {
@Override
protected void sizeChanged(boolean defer, int newWidth, int newHeight, boolean force) {
if(fullscreen) {
- ((KDScreen)getScreen()).setScreenSize(width, height);
+ ((KDScreen)getScreen()).sizeChanged(width, height);
}
super.sizeChanged(defer, newWidth, newHeight, force);
}
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/MacScreen.java b/src/newt/classes/jogamp/newt/driver/macosx/MacScreen.java
index 1c8128a5a..4954b0569 100644
--- a/src/newt/classes/jogamp/newt/driver/macosx/MacScreen.java
+++ b/src/newt/classes/jogamp/newt/driver/macosx/MacScreen.java
@@ -37,6 +37,8 @@ package jogamp.newt.driver.macosx;
import java.util.List;
import javax.media.nativewindow.DefaultGraphicsScreen;
+import javax.media.nativewindow.util.DimensionImmutable;
+import javax.media.nativewindow.util.Dimension;
import jogamp.newt.ScreenImpl;
@@ -53,7 +55,6 @@ public class MacScreen extends ScreenImpl {
protected void createNativeImpl() {
aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
- setScreenSize(getWidthImpl0(screen_idx), getHeightImpl0(screen_idx));
}
protected void closeNativeImpl() { }
@@ -110,6 +111,10 @@ public class MacScreen extends ScreenImpl {
return idx;
}
+ protected DimensionImmutable getNativeScreenSizeImpl() {
+ return new Dimension(getWidthImpl0(screen_idx), getHeightImpl0(screen_idx));
+ }
+
private native int[] getScreenMode0(int screen_index, int mode_index);
private native boolean setScreenMode0(int screen_index, int mode_idx);
}
diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowsScreen.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsScreen.java
index b1cdc36b2..7e3e3626c 100644
--- a/src/newt/classes/jogamp/newt/driver/windows/WindowsScreen.java
+++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsScreen.java
@@ -34,6 +34,8 @@
package jogamp.newt.driver.windows;
import javax.media.nativewindow.DefaultGraphicsScreen;
+import javax.media.nativewindow.util.Dimension;
+import javax.media.nativewindow.util.DimensionImmutable;
import jogamp.newt.ScreenImpl;
@@ -51,9 +53,8 @@ public class WindowsScreen extends ScreenImpl {
protected void createNativeImpl() {
aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
- setScreenSize(getWidthImpl0(screen_idx), getHeightImpl0(screen_idx));
}
-
+
protected void closeNativeImpl() {
}
@@ -105,6 +106,10 @@ public class WindowsScreen extends ScreenImpl {
return 0; // big-desktop, only one screen available
}
+ protected DimensionImmutable getNativeScreenSizeImpl() {
+ return new Dimension(getWidthImpl0(screen_idx), getHeightImpl0(screen_idx));
+ }
+
// Native calls
private native int getWidthImpl0(int scrn_idx);
diff --git a/src/newt/classes/jogamp/newt/driver/x11/X11Screen.java b/src/newt/classes/jogamp/newt/driver/x11/X11Screen.java
index 1c5388d2c..c52a21220 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/X11Screen.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/X11Screen.java
@@ -43,6 +43,8 @@ import com.jogamp.newt.ScreenMode;
import com.jogamp.newt.util.ScreenModeUtil;
import java.util.List;
+import javax.media.nativewindow.util.Dimension;
+import javax.media.nativewindow.util.DimensionImmutable;
import javax.media.nativewindow.x11.*;
public class X11Screen extends ScreenImpl {
@@ -58,11 +60,7 @@ public class X11Screen extends ScreenImpl {
// validate screen index
Long handle = display.runWithLockedDisplayHandle( new DisplayImpl.DisplayRunnable<Long>() {
public Long run(long dpy) {
- long handle = GetScreen0(dpy, screen_idx);
- if(0 != handle) {
- setScreenSize(getWidth0(dpy, screen_idx), getHeight0(dpy, screen_idx));
- }
- return new Long(handle);
+ return new Long(GetScreen0(dpy, screen_idx));
} } );
if (handle.longValue() == 0) {
throw new RuntimeException("Error creating screen: " + screen_idx);
@@ -270,6 +268,13 @@ public class X11Screen extends ScreenImpl {
}
}
+ protected DimensionImmutable getNativeScreenSizeImpl() {
+ return display.runWithLockedDisplayHandle( new DisplayImpl.DisplayRunnable<DimensionImmutable>() {
+ public DimensionImmutable run(long dpy) {
+ return new Dimension(getWidth0(dpy, screen_idx), getHeight0(dpy, screen_idx));
+ } } );
+ }
+
//----------------------------------------------------------------------
// Internals only
//
diff --git a/src/newt/native/X11Screen.c b/src/newt/native/X11Screen.c
index ce8265556..1b7fea770 100644
--- a/src/newt/native/X11Screen.c
+++ b/src/newt/native/X11Screen.c
@@ -57,14 +57,14 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getWidth0
(JNIEnv *env, jclass clazz, jlong display, jint scrn_idx)
{
Display * dpy = (Display *) (intptr_t) display;
- return (jint) XDisplayWidth( dpy, scrn_idx);
+ return (jint) DisplayWidth( dpy, scrn_idx);
}
JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getHeight0
(JNIEnv *env, jclass clazz, jlong display, jint scrn_idx)
{
Display * dpy = (Display *) (intptr_t) display;
- return (jint) XDisplayHeight( dpy, scrn_idx);
+ return (jint) DisplayHeight( dpy, scrn_idx);
}
static int showedRandRVersion = 0;
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
index 7bd421234..a5b7a76e7 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
@@ -38,15 +38,12 @@ import org.junit.Test;
import com.jogamp.newt.Display;
import com.jogamp.newt.NewtFactory;
import com.jogamp.newt.Screen;
-import com.jogamp.newt.Window;
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.opengl.test.junit.util.UITestCase;
import java.util.Iterator;
import java.util.List;
-import javax.media.nativewindow.Capabilities;
import javax.media.nativewindow.util.Dimension;
import javax.media.nativewindow.util.DimensionImmutable;
import javax.media.nativewindow.util.SurfaceSize;
@@ -67,7 +64,7 @@ public class TestScreenMode00NEWT extends UITestCase {
height = 480;
}
- // @Test
+ @Test
public void testScreenModeInfo00() throws InterruptedException {
DimensionImmutable res = new Dimension(640, 480);
SurfaceSize surfsz = new SurfaceSize(res, 32);
@@ -119,8 +116,6 @@ public class TestScreenMode00NEWT extends UITestCase {
System.err.println("curr SM: "+sm_c);
System.err.println("curr sz: "+screen.getWidth()+"x"+screen.getHeight());
Assert.assertEquals(sm_o, sm_c);
- Assert.assertEquals(sm_c.getRotatedWidth(), screen.getWidth());
- Assert.assertEquals(sm_c.getRotatedHeight(), screen.getHeight());
screen.removeReference();
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
index b05b5ad59..c3c68e46c 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
@@ -200,8 +200,6 @@ public class TestScreenMode01NEWT extends UITestCase {
Assert.assertNotNull(smOrig);
Assert.assertEquals(smCurrent, smOrig);
System.err.println("[0] current/orig: "+smCurrent);
- Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth());
- Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight());
screenModes = ScreenModeUtil.filterByRate(screenModes, smOrig.getMonitorMode().getRefreshRate());
Assert.assertNotNull(screenModes);
@@ -222,8 +220,6 @@ public class TestScreenMode01NEWT extends UITestCase {
screen.setCurrentScreenMode(sm);
Assert.assertEquals(sm, screen.getCurrentScreenMode());
Assert.assertNotSame(smOrig, screen.getCurrentScreenMode());
- Assert.assertEquals(sm.getRotatedWidth(), screen.getWidth());
- Assert.assertEquals(sm.getRotatedHeight(), screen.getHeight());
Thread.sleep(waitTimeLong);
@@ -253,8 +249,6 @@ public class TestScreenMode01NEWT extends UITestCase {
Assert.assertNotNull(smCurrent);
Assert.assertEquals(smCurrent, smOrig);
- Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth());
- Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight());
screen.destroy();
@@ -288,8 +282,6 @@ public class TestScreenMode01NEWT extends UITestCase {
Assert.assertNotNull(smOrig);
Assert.assertEquals(smCurrent, smOrig);
System.err.println("[0] current/orig: "+smCurrent);
- Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth());
- Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight());
List<ScreenMode> screenModes = screen.getScreenModes();
if(screenModes.size()==1) {
@@ -316,8 +308,6 @@ public class TestScreenMode01NEWT extends UITestCase {
System.err.println("[0] set current: "+screenMode);
screen.setCurrentScreenMode(screenMode);
- Assert.assertEquals(screenMode.getRotatedWidth(), screen.getWidth());
- Assert.assertEquals(screenMode.getRotatedHeight(), screen.getHeight());
if(!preFS) {
System.err.println("[0] set FS post 0: "+window.isFullscreen());
@@ -354,8 +344,6 @@ public class TestScreenMode01NEWT extends UITestCase {
Assert.assertNotNull(smCurrent);
Assert.assertEquals(smCurrent, smOrig);
- Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth());
- Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight());
screen.destroy();
}