diff options
-rwxr-xr-x | make/scripts/tests-win.bat | 4 | ||||
-rw-r--r-- | make/scripts/tests.sh | 4 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/MonitorModeProps.java | 83 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/ScreenImpl.java | 14 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/android/ScreenDriver.java | 12 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/awt/ScreenDriver.java | 14 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/bcm/egl/ScreenDriver.java | 12 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/bcm/vc/iv/ScreenDriver.java | 12 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/intel/gdl/ScreenDriver.java | 12 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/kd/ScreenDriver.java | 12 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/x11/RandR11.java | 12 |
11 files changed, 140 insertions, 51 deletions
diff --git a/make/scripts/tests-win.bat b/make/scripts/tests-win.bat index df5ec492a..f8cf0de86 100755 --- a/make/scripts/tests-win.bat +++ b/make/scripts/tests-win.bat @@ -97,7 +97,7 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.anim.TestAnimat REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.anim.TestAWTCardLayoutAnimatorStartStopBug532 %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.anim.Bug898AnimatorFromEDTAWT %* -scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLReadBuffer01GLJPanelAWT %* +REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLReadBuffer01GLJPanelAWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLReadBuffer01GLWindowNEWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.awt.TestSwingAWT01GLn @@ -167,7 +167,7 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.TestScreenMode00cN REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.TestScreenMode01aNEWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.TestScreenMode01bNEWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.TestScreenMode01cNEWT %* -REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.TestScreenMode01dNEWT %* +scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.TestScreenMode01dNEWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.TestScreenMode02aNEWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.TestScreenMode02bNEWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.ManualScreenMode03sNEWT %* diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 7fe7d6ddd..7dc6a2032 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -362,7 +362,7 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestGearsES1NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestOlympicES1NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestRedSquareES1NEWT $* -testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT $* +#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT $* #testawt com.jogamp.opengl.test.junit.jogl.awt.TestHiDPIBufferedImage01AWT $* #testawt com.jogamp.opengl.test.junit.jogl.awt.TestHiDPIBufferedImage02AWT $* @@ -547,7 +547,7 @@ testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT $* #testnoawt com.jogamp.opengl.test.junit.newt.mm.TestScreenMode01aNEWT $* #testnoawt com.jogamp.opengl.test.junit.newt.mm.TestScreenMode01bNEWT $* #testnoawt com.jogamp.opengl.test.junit.newt.mm.TestScreenMode01cNEWT $* -#testnoawt com.jogamp.opengl.test.junit.newt.mm.TestScreenMode01dNEWT $* +testnoawt com.jogamp.opengl.test.junit.newt.mm.TestScreenMode01dNEWT $* #testnoawt com.jogamp.opengl.test.junit.newt.mm.TestScreenMode02aNEWT $* #testnoawt com.jogamp.opengl.test.junit.newt.mm.TestScreenMode02bNEWT $* #testnoawt com.jogamp.opengl.test.junit.newt.mm.ManualScreenMode03aNEWT $* diff --git a/src/newt/classes/jogamp/newt/MonitorModeProps.java b/src/newt/classes/jogamp/newt/MonitorModeProps.java index 55cbf77f3..74935977c 100644 --- a/src/newt/classes/jogamp/newt/MonitorModeProps.java +++ b/src/newt/classes/jogamp/newt/MonitorModeProps.java @@ -45,34 +45,76 @@ import jogamp.newt.ScreenImpl; * Encodes and decodes {@link MonitorMode} and {@link MonitorDevice} properties. */ public class MonitorModeProps { - /** WARNING: must be synchronized with ScreenMode.h, native implementation - * 2: width, height + /** + * {@value} Elements: width, height + * <p> + * WARNING: must be synchronized with ScreenMode.h, native implementation + * </p> */ public static final int NUM_RESOLUTION_PROPERTIES = 2; - /** WARNING: must be synchronized with ScreenMode.h, native implementation - * 1: bpp + /** + * {@value} Element: bpp + * <p> + * WARNING: must be synchronized with ScreenMode.h, native implementation + * </p> */ public static final int NUM_SURFACE_SIZE_PROPERTIES = 1; - /** WARNING: must be synchronized with ScreenMode.h, native implementation - * 2: refresh-rate (Hz*100), flags + /** + * {@value} Elements: refresh-rate (Hz*100), flags + * <p> + * WARNING: must be synchronized with ScreenMode.h, native implementation + * </p> */ public static final int NUM_SIZEANDRATE_PROPERTIES = 2; - /** WARNING: must be synchronized with ScreenMode.h, native implementation - * 2: id, rotation + /** + * {@value} Elements: id, rotation + * <p> + * WARNING: must be synchronized with ScreenMode.h, native implementation + * </p> */ public static final int NUM_MONITOR_MODE_PROPERTIES = 2; - /** WARNING: must be synchronized with ScreenMode.h, native implementation - * count + all the above + /** + * {@value} Elements: + * <ul> + * <li>count</li> + * <li>{@link #NUM_RESOLUTION_PROPERTIES}</li> + * <li>{@link #NUM_SURFACE_SIZE_PROPERTIES}</li> + * <li>{@link #NUM_SIZEANDRATE_PROPERTIES}</li> + * <li>{@link #NUM_MONITOR_MODE_PROPERTIES}</li> + * <li>mode-id</li> + * </ul> + * <p> + * WARNING: must be synchronized with ScreenMode.h, native implementation + * </p> */ public static final int NUM_MONITOR_MODE_PROPERTIES_ALL = 8; + /** + * {@value} Elements: count + {@link #NUM_RESOLUTION_PROPERTIES} + * <p> + * WARNING: must be synchronized with ScreenMode.h, native implementation + * </p> + */ public static final int IDX_MONITOR_MODE_BPP = 1 // count + MonitorModeProps.NUM_RESOLUTION_PROPERTIES ; + /** + * {@value} Elements: + * <ul> + * <li>count</li> + * <li>{@link #NUM_RESOLUTION_PROPERTIES}</li> + * <li>{@link #NUM_SURFACE_SIZE_PROPERTIES}</li> + * <li>{@link #NUM_SIZEANDRATE_PROPERTIES}</li> + * <li>mode-id</li> + * </ul> + * <p> + * WARNING: must be synchronized with ScreenMode.h, native implementation + * </p> + */ public static final int IDX_MONITOR_MODE_ROT = 1 // count + MonitorModeProps.NUM_RESOLUTION_PROPERTIES + MonitorModeProps.NUM_SURFACE_SIZE_PROPERTIES @@ -80,9 +122,24 @@ public class MonitorModeProps { + 1 // id of MonitorModeProps.NUM_MONITOR_MODE_PROPERTIES ; - /** WARNING: must be synchronized with ScreenMode.h, native implementation - * 15: count + id, ScreenSizeMM[width, height], rotated Viewport pixel-units, rotated viewport window-units, currentMonitorModeId, rotation, supportedModeId+ - * Viewport := [x, y, width, height] (4 elements) + /** + * {@value} Elements: + * <ul> + * <li>count</li> + * <li>id</li> + * <li>ScreenSizeMM[width, height] (2 elements)</li> + * <li>Rotated Viewport pixel-units (4 elements)</li> + * <li>Rotated Viewport window-units (4 elements)</li> + * <li>CurrentMonitorModeId</li> + * <li>Rotation</li> + * <li>SupportedModeId+</li> + * </ul> + * <p> + * Viewport := [x, y, width, height] (4 elements) + * </p> + * <p> + * WARNING: must be synchronized with ScreenMode.h, native implementation + * </p> */ public static final int MIN_MONITOR_DEVICE_PROPERTIES = 15; diff --git a/src/newt/classes/jogamp/newt/ScreenImpl.java b/src/newt/classes/jogamp/newt/ScreenImpl.java index 949e7fa3b..a31a1e421 100644 --- a/src/newt/classes/jogamp/newt/ScreenImpl.java +++ b/src/newt/classes/jogamp/newt/ScreenImpl.java @@ -489,16 +489,20 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { * @return */ private final MonitorDevice getVirtualMonitorDevice(MonitorModeProps.Cache cache, int monitorId, MonitorMode currentMode) { - int[] props = new int[MonitorModeProps.MIN_MONITOR_DEVICE_PROPERTIES]; + final int[] props = new int[MonitorModeProps.MIN_MONITOR_DEVICE_PROPERTIES]; int i = 0; props[i++] = MonitorModeProps.MIN_MONITOR_DEVICE_PROPERTIES; props[i++] = monitorId; props[i++] = default_sm_widthmm; props[i++] = default_sm_heightmm; - props[i++] = 0; // rotated viewport x - props[i++] = 0; // rotated viewport y - props[i++] = currentMode.getRotatedWidth(); // rotated viewport width - props[i++] = currentMode.getRotatedHeight(); // rotated viewport height + props[i++] = 0; // rotated viewport x pixel-units + props[i++] = 0; // rotated viewport y pixel-units + props[i++] = currentMode.getRotatedWidth(); // rotated viewport width pixel-units + props[i++] = currentMode.getRotatedHeight(); // rotated viewport height pixel-units + props[i++] = 0; // rotated viewport x window-units + props[i++] = 0; // rotated viewport y window-units + props[i++] = currentMode.getRotatedWidth(); // rotated viewport width window-units + props[i++] = currentMode.getRotatedHeight(); // rotated viewport height window-units props[i++] = currentMode.getId(); // current mode id props[i++] = currentMode.getRotation(); props[i++] = currentMode.getId(); // supported mode id #1 diff --git a/src/newt/classes/jogamp/newt/driver/android/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/android/ScreenDriver.java index 66237204c..a4c70343d 100644 --- a/src/newt/classes/jogamp/newt/driver/android/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/android/ScreenDriver.java @@ -105,10 +105,14 @@ public class ScreenDriver extends jogamp.newt.ScreenImpl { props[i++] = props.length; props[i++] = 0; // crt_idx i = getScreenSizeMM(outMetrics, props, i); // sizeMM - props[i++] = 0; // rotated viewport x - props[i++] = 0; // rotated viewport y - props[i++] = outMetrics.widthPixels; // rotated viewport width - props[i++] = outMetrics.heightPixels; // rotated viewport height + props[i++] = 0; // rotated viewport x pixel-units + props[i++] = 0; // rotated viewport y pixel-units + props[i++] = outMetrics.widthPixels; // rotated viewport width pixel-units + props[i++] = outMetrics.heightPixels; // rotated viewport height pixel-units + props[i++] = 0; // rotated viewport x window-units + props[i++] = 0; // rotated viewport y window-units + props[i++] = outMetrics.widthPixels; // rotated viewport width window-units + props[i++] = outMetrics.heightPixels; // rotated viewport height window-units MonitorModeProps.streamInMonitorDevice(null, cache, this, cache.monitorModes, currentMode, props, 0); } diff --git a/src/newt/classes/jogamp/newt/driver/awt/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/awt/ScreenDriver.java index a4356707e..128c94e87 100644 --- a/src/newt/classes/jogamp/newt/driver/awt/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/awt/ScreenDriver.java @@ -105,16 +105,20 @@ public class ScreenDriver extends ScreenImpl { } final MonitorMode currentMode = getModeProps(cache, awtGD.getDisplayMode()); - int[] props = new int[MonitorModeProps.MIN_MONITOR_DEVICE_PROPERTIES - 1 - MonitorModeProps.NUM_MONITOR_MODE_PROPERTIES]; + final int[] props = new int[MonitorModeProps.MIN_MONITOR_DEVICE_PROPERTIES - 1 - MonitorModeProps.NUM_MONITOR_MODE_PROPERTIES]; int i = 0; props[i++] = props.length; props[i++] = 0; // crt_idx props[i++] = ScreenImpl.default_sm_widthmm; // FIXME props[i++] = ScreenImpl.default_sm_heightmm; // FIXME - props[i++] = 0; // rotated viewport x - props[i++] = 0; // rotated viewport y - props[i++] = currentMode.getRotatedWidth(); // rotated viewport width - props[i++] = currentMode.getRotatedHeight(); // rotated viewport height + props[i++] = 0; // rotated viewport x pixel-units + props[i++] = 0; // rotated viewport y pixel-units + props[i++] = currentMode.getRotatedWidth(); // rotated viewport width pixel-units + props[i++] = currentMode.getRotatedHeight(); // rotated viewport height pixel-units + props[i++] = 0; // rotated viewport x window-units + props[i++] = 0; // rotated viewport y window-units + props[i++] = currentMode.getRotatedWidth(); // rotated viewport width window-units + props[i++] = currentMode.getRotatedHeight(); // rotated viewport height window-units MonitorModeProps.streamInMonitorDevice(null, cache, this, cache.monitorModes, currentMode, props, 0); } diff --git a/src/newt/classes/jogamp/newt/driver/bcm/egl/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/egl/ScreenDriver.java index 64bc87a41..efedf7c7a 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/egl/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/egl/ScreenDriver.java @@ -86,10 +86,14 @@ public class ScreenDriver extends jogamp.newt.ScreenImpl { props[i++] = 0; // crt_idx props[i++] = ScreenImpl.default_sm_widthmm; // FIXME props[i++] = ScreenImpl.default_sm_heightmm; // FIXME - props[i++] = 0; // rotated viewport x - props[i++] = 0; // rotated viewport y - props[i++] = fixedWidth; // FIXME rotated viewport width - props[i++] = fixedHeight; // FIXME rotated viewport height + props[i++] = 0; // rotated viewport x pixel-units + props[i++] = 0; // rotated viewport y pixel-units + props[i++] = fixedWidth; // FIXME rotated viewport width pixel-units + props[i++] = fixedHeight; // FIXME rotated viewport height pixel-units + props[i++] = 0; // rotated viewport x window-units + props[i++] = 0; // rotated viewport y window-units + props[i++] = fixedWidth; // FIXME rotated viewport width window-units + props[i++] = fixedHeight; // FIXME rotated viewport height window-units MonitorModeProps.streamInMonitorDevice(null, cache, this, cache.monitorModes, currentMode, props, 0); } diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/ScreenDriver.java index e0228c10f..404f03eed 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/ScreenDriver.java @@ -79,10 +79,14 @@ public class ScreenDriver extends ScreenImpl { props[i++] = 0; // crt_idx props[i++] = ScreenImpl.default_sm_widthmm; // FIXME props[i++] = ScreenImpl.default_sm_heightmm; // FIXME - props[i++] = 0; // rotated viewport x - props[i++] = 0; // rotated viewport y - props[i++] = cachedWidth; // rotated viewport width - props[i++] = cachedWidth; // rotated viewport height + props[i++] = 0; // rotated viewport x pixel-units + props[i++] = 0; // rotated viewport y pixel-units + props[i++] = cachedWidth; // rotated viewport width pixel-units + props[i++] = cachedWidth; // rotated viewport height pixel-units + props[i++] = 0; // rotated viewport x window-units + props[i++] = 0; // rotated viewport y window-units + props[i++] = cachedWidth; // rotated viewport width window-units + props[i++] = cachedWidth; // rotated viewport height window-units MonitorModeProps.streamInMonitorDevice(null, cache, this, cache.monitorModes, currentMode, props, 0); } diff --git a/src/newt/classes/jogamp/newt/driver/intel/gdl/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/ScreenDriver.java index 20c60565a..89d7540da 100644 --- a/src/newt/classes/jogamp/newt/driver/intel/gdl/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/ScreenDriver.java @@ -88,10 +88,14 @@ public class ScreenDriver extends jogamp.newt.ScreenImpl { props[i++] = 0; // crt_idx props[i++] = ScreenImpl.default_sm_widthmm; // FIXME props[i++] = ScreenImpl.default_sm_heightmm; // FIXME - props[i++] = 0; // rotated viewport x - props[i++] = 0; // rotated viewport y - props[i++] = cachedWidth; // rotated viewport width - props[i++] = cachedWidth; // rotated viewport height + props[i++] = 0; // rotated viewport x pixel-units + props[i++] = 0; // rotated viewport y pixel-units + props[i++] = cachedWidth; // rotated viewport width pixel-units + props[i++] = cachedWidth; // rotated viewport height pixel-units + props[i++] = 0; // rotated viewport x window-units + props[i++] = 0; // rotated viewport y window-units + props[i++] = cachedWidth; // rotated viewport width window-units + props[i++] = cachedWidth; // rotated viewport height window-units MonitorModeProps.streamInMonitorDevice(null, cache, this, cache.monitorModes, currentMode, props, 0); } diff --git a/src/newt/classes/jogamp/newt/driver/kd/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/kd/ScreenDriver.java index 541576250..6245f3207 100644 --- a/src/newt/classes/jogamp/newt/driver/kd/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/kd/ScreenDriver.java @@ -84,10 +84,14 @@ public class ScreenDriver extends ScreenImpl { props[i++] = 0; // crt_idx props[i++] = ScreenImpl.default_sm_widthmm; // FIXME props[i++] = ScreenImpl.default_sm_heightmm; // FIXME - props[i++] = 0; // rotated viewport x - props[i++] = 0; // rotated viewport y - props[i++] = cachedWidth; // rotated viewport width - props[i++] = cachedWidth; // rotated viewport height + props[i++] = 0; // rotated viewport x pixel-units + props[i++] = 0; // rotated viewport y pixel-units + props[i++] = cachedWidth; // rotated viewport width pixel-units + props[i++] = cachedWidth; // rotated viewport height pixel-units + props[i++] = 0; // rotated viewport x window-units + props[i++] = 0; // rotated viewport y window-units + props[i++] = cachedWidth; // rotated viewport width window-units + props[i++] = cachedWidth; // rotated viewport height window-units MonitorModeProps.streamInMonitorDevice(null, cache, this, cache.monitorModes, currentMode, props, 0); } diff --git a/src/newt/classes/jogamp/newt/driver/x11/RandR11.java b/src/newt/classes/jogamp/newt/driver/x11/RandR11.java index 6c22a3fc6..23fd0f80f 100644 --- a/src/newt/classes/jogamp/newt/driver/x11/RandR11.java +++ b/src/newt/classes/jogamp/newt/driver/x11/RandR11.java @@ -187,10 +187,14 @@ class RandR11 implements RandR { props[i++] = crt_idx; props[i++] = widthMM; props[i++] = heightMM; - props[i++] = 0; // rotated viewport x - props[i++] = 0; // rotated viewport y - props[i++] = currentMode.getRotatedWidth(); // rotated viewport width - props[i++] = currentMode.getRotatedHeight(); // rotated viewport height + props[i++] = 0; // rotated viewport x pixel-units + props[i++] = 0; // rotated viewport y pixel-units + props[i++] = currentMode.getRotatedWidth(); // rotated viewport width pixel-units + props[i++] = currentMode.getRotatedHeight(); // rotated viewport height pixel-units + props[i++] = 0; // rotated viewport x window-units + props[i++] = 0; // rotated viewport y window-units + props[i++] = currentMode.getRotatedWidth(); // rotated viewport width window-units + props[i++] = currentMode.getRotatedHeight(); // rotated viewport height window-units props[i++] = currentMode.getId(); // current mode id props[i++] = currentMode.getRotation(); for(int j=0; j<allModesCount; j++) { |