diff options
author | Harvey Harrison <[email protected]> | 2012-11-18 18:28:50 -0800 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2012-11-18 18:28:50 -0800 |
commit | 4a8f681b98081ac1b8c25919fe34518e11119955 (patch) | |
tree | e79856332bef53b90e7dcfc31bafb5f4371e450e | |
parent | 301ab2819f4b9ee0374ab3c33da2ab16f0b47eee (diff) |
j3dcore: remove the fullscreen mode toggle used by D3D
Signed-off-by: Harvey Harrison <[email protected]>
-rw-r--r-- | src/classes/share/javax/media/j3d/Canvas3D.java | 122 |
1 files changed, 5 insertions, 117 deletions
diff --git a/src/classes/share/javax/media/j3d/Canvas3D.java b/src/classes/share/javax/media/j3d/Canvas3D.java index 9b9a467..aa05427 100644 --- a/src/classes/share/javax/media/j3d/Canvas3D.java +++ b/src/classes/share/javax/media/j3d/Canvas3D.java @@ -37,7 +37,6 @@ import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.IllegalComponentStateException; import java.awt.Point; -import java.awt.Rectangle; import java.awt.Window; import java.awt.image.BufferedImage; import java.util.ArrayList; @@ -732,13 +731,6 @@ ArrayList<Integer> textureIdResourceFreeList = new ArrayList<Integer>(); Object evaluateLock = new Object(); Object dirtyMaskLock = new Object(); - // Use by D3D when toggle between window/fullscreen mode. - // Note that in fullscreen mode, the width and height get - // by canvas is smaller than expected. - boolean fullScreenMode = false; - int fullscreenWidth; - int fullscreenHeight; - // For D3D, instead of using the same variable in Renderer, // each canvas has to build its own displayList. boolean needToRebuildDisplayList = false; @@ -3953,118 +3945,14 @@ void resetImmediateRendering() { ctxTimeStamp = VirtualUniverse.mc.getContextTimeStamp(); } - - // overide Canvas.getSize() - public Dimension getSize() { - if (!fullScreenMode) { - return super.getSize(); - } else { - return new Dimension(fullscreenWidth, fullscreenHeight); - } - } - - public Dimension getSize(Dimension rv) { - if (!fullScreenMode) { - return super.getSize(rv); - } else { - if (rv == null) { - return new Dimension(fullscreenWidth, fullscreenHeight); - } else { - rv.setSize(fullscreenWidth, fullscreenHeight); - return rv; - } - } - } - - public Point getLocationOnScreen() { - if (!fullScreenMode) { - try { +public Point getLocationOnScreen() { + try { return super.getLocationOnScreen(); - } catch (IllegalComponentStateException e) {} - } - return new Point(); - } - - public int getX() { - if (!fullScreenMode) { - return super.getX(); - } else { - return 0; - } - } - - - public int getY() { - if (!fullScreenMode) { - return super.getY(); - } else { - return 0; - } - } - - public int getWidth() { - if (!fullScreenMode) { - return super.getWidth(); - } else { - return screen.screenSize.width; - } - } - - public int getHeight() { - if (!fullScreenMode) { - return super.getHeight(); - } else { - return screen.screenSize.height; - } - } - - public Point getLocation(Point rv) { - if (!fullScreenMode) { - return super.getLocation(rv); - } else { - if (rv != null) { - rv.setLocation(0, 0); - return rv; - } else { - return new Point(); - } } - } + catch (IllegalComponentStateException e) {} - public Point getLocation() { - if (!fullScreenMode) { - return super.getLocation(); - } else { - return new Point(); - } - } - - public Rectangle getBounds() { - if (!fullScreenMode) { - return super.getBounds(); - } else { - return new Rectangle(0, 0, - screen.screenSize.width, - screen.screenSize.height); - } - } - - public Rectangle getBounds(Rectangle rv) { - if (!fullScreenMode) { - return super.getBounds(rv); - } else { - if (rv != null) { - rv.setBounds(0, 0, - screen.screenSize.width, - screen.screenSize.height); - return rv; - } else { - return new Rectangle(0, 0, - screen.screenSize.width, - screen.screenSize.height); - } - } - } + return new Point(); +} void setProjectionMatrix(Context ctx, Transform3D projTrans) { this.projTrans = projTrans; |