aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChien Yang <[email protected]>2007-04-20 22:53:31 +0000
committerChien Yang <[email protected]>2007-04-20 22:53:31 +0000
commitdfcdd1a2d99584d1ec44a280d8186150756dfc64 (patch)
tree0ef0f8bcf61fc802bafcdd2cc82eece3872f7065
parent5748a6d8ccb6e9690f3d772de2f4ed04ccb43cb0 (diff)
Fixed to Issue 412 : Exception when updating Y_UP BY_REFERENCE image
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@828 ba19aa83-45c5-6ac9-afd3-db810772062c
-rw-r--r--src/classes/share/javax/media/j3d/ImageComponentRetained.java8
-rw-r--r--src/classes/share/javax/media/j3d/TextureRetained.java7
2 files changed, 14 insertions, 1 deletions
diff --git a/src/classes/share/javax/media/j3d/ImageComponentRetained.java b/src/classes/share/javax/media/j3d/ImageComponentRetained.java
index 1fe18ef..7a1548a 100644
--- a/src/classes/share/javax/media/j3d/ImageComponentRetained.java
+++ b/src/classes/share/javax/media/j3d/ImageComponentRetained.java
@@ -383,9 +383,15 @@ abstract class ImageComponentRetained extends NodeComponentRetained {
return imageType;
}
}
+ else {
+ // Fix to Issue 412. Force copy for RenderedImage of type not equal to BufferedImage.
+ return imageType;
+ }
// System.err.println("This is a RenderedImage or BufferedImage with TYPE_CUSTOM. It imageType classification may not be correct.");
-
+ // TODO : Dead code - need to clean up for 1.6
+ assert false;
+
ColorModel cm = ri.getColorModel();
ColorSpace cs = cm.getColorSpace();
SampleModel sm = ri.getSampleModel();
diff --git a/src/classes/share/javax/media/j3d/TextureRetained.java b/src/classes/share/javax/media/j3d/TextureRetained.java
index e23e8f9..8fad226 100644
--- a/src/classes/share/javax/media/j3d/TextureRetained.java
+++ b/src/classes/share/javax/media/j3d/TextureRetained.java
@@ -1317,6 +1317,8 @@ abstract class TextureRetained extends NodeComponentRetained {
boolean useAsRaster = isUseAsRaster();
ImageComponentRetained.ImageData imageData = image.getImageData(useAsRaster);
+
+ assert imageData != null;
updateTextureImage(cv,
face, numLevels, level,
@@ -1325,6 +1327,8 @@ abstract class TextureRetained extends NodeComponentRetained {
boundaryWidth, image.getImageDataTypeIntValue(),
imageData.get());
+
+ // TODO : Dead code - need to clean up for 1.6
// Now take care of the RenderedImage (byRef and yUp) case. Note, if image
// is a RenderedImage ( byRef and yUp), then imageData will be null
@@ -1428,6 +1432,9 @@ abstract class TextureRetained extends NodeComponentRetained {
} else {
+ assert false;
+
+ // TODO : Dead code - need to clean up for 1.6
// System.err.println("RenderedImage subImage update");
// determine the first tile of the image