aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-examples/src/main
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2013-05-09 18:40:47 +0200
committerJulien Gouesse <[email protected]>2013-05-09 18:40:47 +0200
commita0de39780778110895233d2fe41048b8c3e120aa (patch)
tree5c4dfc084f1130abc60d3acc1a235a35b2d311bb /ardor3d-examples/src/main
parenta5a28593b52b96c7b06017a3a519c11dba07b298 (diff)
Modifies the few classes using NEWT to fix compile errors caused by API changes in JOGL 2.0 build 987
Diffstat (limited to 'ardor3d-examples/src/main')
-rw-r--r--ardor3d-examples/src/main/java/com/ardor3d/example/applet/JoglBaseApplet.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/ardor3d-examples/src/main/java/com/ardor3d/example/applet/JoglBaseApplet.java b/ardor3d-examples/src/main/java/com/ardor3d/example/applet/JoglBaseApplet.java
index 148d765..0c3f726 100644
--- a/ardor3d-examples/src/main/java/com/ardor3d/example/applet/JoglBaseApplet.java
+++ b/ardor3d-examples/src/main/java/com/ardor3d/example/applet/JoglBaseApplet.java
@@ -17,6 +17,8 @@ import java.awt.event.ComponentEvent;
import java.net.URISyntaxException;
import java.util.concurrent.Callable;
+import javax.media.nativewindow.util.DimensionImmutable;
+
import com.ardor3d.annotation.MainThread;
import com.ardor3d.framework.DisplaySettings;
import com.ardor3d.framework.FrameHandler;
@@ -59,7 +61,6 @@ import com.ardor3d.util.Timer;
import com.ardor3d.util.resource.ResourceLocatorTool;
import com.ardor3d.util.resource.SimpleResourceLocator;
import com.ardor3d.util.stat.StatCollector;
-import com.jogamp.newt.ScreenMode;
/**
* An example base class for ardor3d/jogl applets. This is not meant to be a "best-practices" applet, just a rough demo
@@ -226,14 +227,12 @@ public abstract class JoglBaseApplet extends Applet implements Scene {
_glCanvas.getNewtWindow().setFullscreen(!_glCanvas.getNewtWindow().isFullscreen());
final Camera cam = _glCanvas.getCanvasRenderer().getCamera();
if (_glCanvas.getNewtWindow().isFullscreen()) {
- final ScreenMode mode = _glCanvas.getNewtWindow().getScreen().getCurrentScreenMode();
- cam.resize(mode.getMonitorMode().getScreenSizeMM().getWidth(), mode.getMonitorMode()
- .getScreenSizeMM().getHeight());
- cam.setFrustumPerspective(cam.getFovY(), mode.getMonitorMode().getScreenSizeMM().getWidth()
- / (float) mode.getMonitorMode().getScreenSizeMM().getHeight(), cam.getFrustumNear(),
+ final DimensionImmutable screenSizeMM = _glCanvas.getNewtWindow().getMainMonitor().getSizeMM();
+ cam.resize(screenSizeMM.getWidth(), screenSizeMM.getHeight());
+ cam.setFrustumPerspective(cam.getFovY(),
+ screenSizeMM.getWidth() / (float) screenSizeMM.getHeight(), cam.getFrustumNear(),
cam.getFrustumFar());
- appletResized(mode.getMonitorMode().getScreenSizeMM().getWidth(), mode.getMonitorMode()
- .getScreenSizeMM().getHeight());
+ appletResized(screenSizeMM.getWidth(), screenSizeMM.getHeight());
} else {
cam.resize(getWidth(), getHeight());
cam.setFrustumPerspective(cam.getFovY(), getWidth() / (float) getHeight(), cam.getFrustumNear(),