From a0de39780778110895233d2fe41048b8c3e120aa Mon Sep 17 00:00:00 2001 From: Julien Gouesse Date: Thu, 9 May 2013 18:40:47 +0200 Subject: Modifies the few classes using NEWT to fix compile errors caused by API changes in JOGL 2.0 build 987 --- .../com/ardor3d/framework/jogl/JoglNewtWindow.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'ardor3d-jogl/src/main') diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java index 9f6a710..1dc9dcc 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java @@ -22,15 +22,15 @@ import com.ardor3d.annotation.MainThread; import com.ardor3d.framework.DisplaySettings; import com.ardor3d.framework.NativeCanvas; import com.ardor3d.image.Image; -import com.jogamp.newt.Screen; -import com.jogamp.newt.ScreenMode; +import com.jogamp.newt.MonitorDevice; +import com.jogamp.newt.MonitorMode; import com.jogamp.newt.event.KeyListener; import com.jogamp.newt.event.MouseListener; import com.jogamp.newt.event.WindowAdapter; import com.jogamp.newt.event.WindowEvent; import com.jogamp.newt.event.WindowListener; import com.jogamp.newt.opengl.GLWindow; -import com.jogamp.newt.util.ScreenModeUtil; +import com.jogamp.newt.util.MonitorModeUtil; public class JoglNewtWindow implements NativeCanvas, NewtWindowContainer { @@ -77,18 +77,18 @@ public class JoglNewtWindow implements NativeCanvas, NewtWindowContainer { * current resolution */ if (_settings.isFullScreen()) { - final Screen screen = _newtWindow.getScreen(); - List screenModes = screen.getScreenModes(); + final MonitorDevice monitor = _newtWindow.getMainMonitor(); + List monitorModes = monitor.getSupportedModes(); // the resolution is provided by the user final Dimension dimension = new Dimension(_settings.getWidth(), _settings.getHeight()); - screenModes = ScreenModeUtil.filterByResolution(screenModes, dimension); - screenModes = ScreenModeUtil.getHighestAvailableBpp(screenModes); + monitorModes = MonitorModeUtil.filterByResolution(monitorModes, dimension); + monitorModes = MonitorModeUtil.getHighestAvailableBpp(monitorModes); if (_settings.getFrequency() > 0) { - screenModes = ScreenModeUtil.filterByRate(screenModes, _settings.getFrequency()); + monitorModes = MonitorModeUtil.filterByRate(monitorModes, _settings.getFrequency()); } else { - screenModes = ScreenModeUtil.getHighestAvailableRate(screenModes); + monitorModes = MonitorModeUtil.getHighestAvailableRate(monitorModes); } - screen.setCurrentScreenMode(screenModes.get(0)); + monitor.setCurrentMode(monitorModes.get(0)); } } -- cgit v1.2.3