diff options
author | jada <jada@28c7f869-5b4e-e670-f602-82bfaf57f300> | 2006-12-09 05:53:22 +0000 |
---|---|---|
committer | jada <jada@28c7f869-5b4e-e670-f602-82bfaf57f300> | 2006-12-09 05:53:22 +0000 |
commit | 5d49942bc9effdc9534b6523cf92f257476e0c9a (patch) | |
tree | 241ca32f2b23e544762d93f2aafc3bd5947543ba | |
parent | 320323faa8e5f592bc00457e5a7c98d4787f5f0d (diff) |
Update example programs to use the new optimize path in ImageComponent2D.
5 files changed, 9 insertions, 9 deletions
diff --git a/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/OffScreenCanvas3D.java b/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/OffScreenCanvas3D.java index 503dc42..c7854aa 100644 --- a/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/OffScreenCanvas3D.java +++ b/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/OffScreenCanvas3D.java @@ -72,7 +72,7 @@ class OffScreenCanvas3D extends Canvas3D { 200, 200 , BufferedImage.TYPE_INT_ARGB); ImageComponent2D buffer = new ImageComponent2D( - ImageComponent.FORMAT_RGBA, bImage); + ImageComponent.FORMAT_RGBA, bImage, true, true); buffer.setCapability(ImageComponent2D.ALLOW_IMAGE_READ); this.setOffScreenBuffer(buffer); @@ -97,7 +97,7 @@ class OffScreenCanvas3D extends Canvas3D { BufferedImage bImage = this.getOffScreenBuffer().getImage(); ImageComponent2D newImageComponent = new ImageComponent2D( - ImageComponent.FORMAT_RGBA, bImage); + ImageComponent.FORMAT_RGBA, bImage, true, true); drawRaster.setImage(newImageComponent); } diff --git a/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/OffScreenTest.java b/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/OffScreenTest.java index f432e46..f6d05d9 100644 --- a/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/OffScreenTest.java +++ b/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/OffScreenTest.java @@ -85,7 +85,7 @@ public class OffScreenTest extends javax.swing.JFrame { BufferedImage bImage = new BufferedImage(200, 200 , BufferedImage.TYPE_INT_ARGB); ImageComponent2D buffer = - new ImageComponent2D(ImageComponent.FORMAT_RGBA, bImage); + new ImageComponent2D(ImageComponent.FORMAT_RGBA, bImage, true, true); buffer.setCapability(ImageComponent2D.ALLOW_IMAGE_READ); drawRaster = new Raster(new Point3f(0.0f, 0.0f, 0.0f), diff --git a/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/PrintFromButton.java b/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/PrintFromButton.java index 89d6557..8470dcc 100644 --- a/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/PrintFromButton.java +++ b/src/classes/org/jdesktop/j3d/examples/offscreen_canvas3d/PrintFromButton.java @@ -88,7 +88,7 @@ public class PrintFromButton extends javax.swing.JFrame { BufferedImage bImage = new BufferedImage(200, 200 , BufferedImage.TYPE_INT_ARGB); ImageComponent2D buffer = - new ImageComponent2D(ImageComponent.FORMAT_RGBA, bImage); + new ImageComponent2D(ImageComponent.FORMAT_RGBA, bImage, true, true); buffer.setCapability(ImageComponent2D.ALLOW_IMAGE_READ); drawRaster = new Raster(new Point3f(0.0f, 0.0f, 0.0f), diff --git a/src/classes/org/jdesktop/j3d/examples/read_raster/ReadRaster.java b/src/classes/org/jdesktop/j3d/examples/read_raster/ReadRaster.java index a6be8f3..856c7fd 100644 --- a/src/classes/org/jdesktop/j3d/examples/read_raster/ReadRaster.java +++ b/src/classes/org/jdesktop/j3d/examples/read_raster/ReadRaster.java @@ -70,7 +70,7 @@ public class ReadRaster extends Applet { // Create a Raster shape. Add it to the root of the subgraph ImageComponent2D drawImageComponent = new ImageComponent2D( - ImageComponent.FORMAT_RGB, bImage); + ImageComponent.FORMAT_RGB, bImage, true, true); Raster drawRaster= new Raster(new Point3f(0.0f, 0.0f, 0.0f), Raster.RASTER_COLOR, 0, 0, bImage.getWidth(), @@ -129,7 +129,7 @@ public class ReadRaster extends Applet { int height = 128; ImageComponent2D readImageComponent = new ImageComponent2D( - ImageComponent.FORMAT_RGB, width, height); + ImageComponent.FORMAT_RGB, width, height, false, true); Raster readRaster = new Raster(new Point3f(0.0f,0.0f,0.0f), Raster.RASTER_COLOR, 0, 0, width, @@ -144,7 +144,7 @@ public class ReadRaster extends Applet { // Create a simple scene and attach it to the virtual universe BufferedImage bImage = new BufferedImage(width, height, - BufferedImage.TYPE_INT_ARGB); + BufferedImage.TYPE_INT_RGB); BranchGroup scene = createSceneGraph(bImage, readRaster); u = new SimpleUniverse(c); @@ -217,7 +217,7 @@ class myRotationInterpolator extends RotationInterpolator { bImage = readRaster.getImage().getImage(); } newImageComponent = new ImageComponent2D(ImageComponent.FORMAT_RGB, - bImage); + bImage, true, true); drawRaster.setImage(newImageComponent); super.processStimulus(criteria); } diff --git a/src/classes/org/jdesktop/j3d/examples/texture/MultiTextureTest.java b/src/classes/org/jdesktop/j3d/examples/texture/MultiTextureTest.java index f1ebf02..5a6b976 100644 --- a/src/classes/org/jdesktop/j3d/examples/texture/MultiTextureTest.java +++ b/src/classes/org/jdesktop/j3d/examples/texture/MultiTextureTest.java @@ -111,7 +111,7 @@ public class MultiTextureTest extends Applet implements ItemListener{ bimage.setRGB(0, 0, width, height, rgbArray, 0, width); - ImageComponent2D grayImage = new ImageComponent2D(ImageComponent.FORMAT_RGB, bimage); + ImageComponent2D grayImage = new ImageComponent2D(ImageComponent.FORMAT_RGB, bimage, true, true); lightTex = new Texture2D(Texture.BASE_LEVEL, Texture.RGB, width, height); lightTex.setImage(0, grayImage); |