diff options
-rw-r--r-- | src/classes/share/javax/media/j3d/ImageComponentRetained.java | 8 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/TextureRetained.java | 7 |
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 |