diff options
-rw-r--r-- | src/classes/share/javax/media/j3d/ImageComponentRetained.java | 3 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/TextureRetained.java | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/classes/share/javax/media/j3d/ImageComponentRetained.java b/src/classes/share/javax/media/j3d/ImageComponentRetained.java index 5f6473b..84efb72 100644 --- a/src/classes/share/javax/media/j3d/ImageComponentRetained.java +++ b/src/classes/share/javax/media/j3d/ImageComponentRetained.java @@ -103,6 +103,9 @@ abstract class ImageComponentRetained extends NodeComponentRetained { // and graphics driver doesn't support NPOT extension. private ImageData imageDataPowerOfTwo; private AffineTransformOp powerOfTwoATOp; + // The following flag means that if the image is non-power-of-two and the + // card doesn't support NPOT texture, we will scale the image to a power + // of two. private boolean enforceNonPowerOfTwoSupport = false; private boolean usedByOffScreenCanvas = false; diff --git a/src/classes/share/javax/media/j3d/TextureRetained.java b/src/classes/share/javax/media/j3d/TextureRetained.java index 62afe95..eb13480 100644 --- a/src/classes/share/javax/media/j3d/TextureRetained.java +++ b/src/classes/share/javax/media/j3d/TextureRetained.java @@ -1102,7 +1102,7 @@ abstract class TextureRetained extends NodeComponentRetained { } private boolean isEnabled(Canvas3D cv) { - if(widthOrHeightIsNPOT && + if(widthOrHeightIsNPOT && !isUseAsRaster() && ((cv.textureExtendedFeatures & Canvas3D.TEXTURE_NON_POWER_OF_TWO ) == 0)) { return false; } |