Initial work on making use of full-screen exclusive mode and additional
rendering optimizations available in JDK 1.4. Use a BufferStrategy, and changed AnimatedPanel to extend Canvas rather than JPanel. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@847 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: IsoSceneView.java,v 1.81 2001/12/18 08:38:33 mdb Exp $
|
||||
// $Id: IsoSceneView.java,v 1.82 2002/01/08 22:16:59 shaper Exp $
|
||||
|
||||
package com.threerings.miso.scene;
|
||||
|
||||
@@ -143,9 +143,7 @@ public class IsoSceneView implements SceneView
|
||||
*/
|
||||
protected void invalidate ()
|
||||
{
|
||||
DirtyRectList rects = new DirtyRectList();
|
||||
rects.add(_model.bounds);
|
||||
invalidateRects(rects);
|
||||
invalidateRect(_model.bounds);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//
|
||||
// $Id: SceneView.java,v 1.20 2001/12/15 04:20:55 mdb Exp $
|
||||
// $Id: SceneView.java,v 1.21 2002/01/08 22:16:59 shaper Exp $
|
||||
|
||||
package com.threerings.miso.scene;
|
||||
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.List;
|
||||
|
||||
import com.threerings.media.sprite.DirtyRectList;
|
||||
@@ -25,6 +26,14 @@ public interface SceneView
|
||||
*/
|
||||
public void invalidateRects (DirtyRectList rects);
|
||||
|
||||
/**
|
||||
* Invalidate a rectangle in screen pixel coordinates in the scene
|
||||
* view for later repainting.
|
||||
*
|
||||
* @param rect the {@link java.awt.Rectangle} object.
|
||||
*/
|
||||
public void invalidateRect (Rectangle rect);
|
||||
|
||||
/**
|
||||
* Renders the scene to the given graphics context.
|
||||
*
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
//
|
||||
// $Id: SceneViewPanel.java,v 1.21 2001/11/29 20:33:16 mdb Exp $
|
||||
// $Id: SceneViewPanel.java,v 1.22 2002/01/08 22:16:59 shaper Exp $
|
||||
|
||||
package com.threerings.miso.scene;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import javax.swing.*;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Rectangle;
|
||||
|
||||
import com.samskivert.util.Config;
|
||||
|
||||
import com.threerings.media.sprite.*;
|
||||
import com.threerings.media.sprite.AnimatedPanel;
|
||||
import com.threerings.media.sprite.DirtyRectList;
|
||||
import com.threerings.media.sprite.SpriteManager;
|
||||
import com.threerings.miso.util.MisoUtil;
|
||||
|
||||
/**
|
||||
@@ -82,6 +84,12 @@ public class SceneViewPanel extends AnimatedPanel
|
||||
_view.invalidateRects(rects);
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public void invalidateRect (Rectangle rect)
|
||||
{
|
||||
_view.invalidateRect(rect);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the desired size for the panel based on the requested
|
||||
* and calculated bounds of the scene view.
|
||||
|
||||
Reference in New Issue
Block a user