aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes
diff options
context:
space:
mode:
authorChien Yang <[email protected]>2007-03-07 19:36:01 +0000
committerChien Yang <[email protected]>2007-03-07 19:36:01 +0000
commit653015cc1618a83baefca14e0600e68ba4681da3 (patch)
tree6bf8103f67c58f4edabdcb794fbde8630a2f63cf /src/classes
parent462b4a4200cf6aeb6ac4f7133dd7f8ae1abae319 (diff)
Fix to Issue 456 : NPOT background ( maybe raster) fail to work if HW doesn't support NPOT texture
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@788 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/classes')
-rw-r--r--src/classes/share/javax/media/j3d/ImageComponentRetained.java3
-rw-r--r--src/classes/share/javax/media/j3d/TextureRetained.java2
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;
}