aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/share/javax
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/share/javax')
-rw-r--r--src/classes/share/javax/media/j3d/Canvas3D.java8
-rw-r--r--src/classes/share/javax/media/j3d/Texture.java38
-rw-r--r--src/classes/share/javax/media/j3d/Texture3D.java23
3 files changed, 15 insertions, 54 deletions
diff --git a/src/classes/share/javax/media/j3d/Canvas3D.java b/src/classes/share/javax/media/j3d/Canvas3D.java
index 547c62f..8981551 100644
--- a/src/classes/share/javax/media/j3d/Canvas3D.java
+++ b/src/classes/share/javax/media/j3d/Canvas3D.java
@@ -3723,12 +3723,8 @@ public class Canvas3D extends Canvas {
(textureExtendedFeatures & TEXTURE_LOD_OFFSET) != 0));
keys.add("textureNonPowerOfTwoAvailable");
- if (VirtualUniverse.mc.enforcePowerOfTwo) {
- values.add(Boolean.FALSE);
- } else {
- values.add(new Boolean(
- (textureExtendedFeatures & TEXTURE_NON_POWER_OF_TWO) != 0));
- }
+ values.add(new Boolean(
+ (textureExtendedFeatures & TEXTURE_NON_POWER_OF_TWO) != 0));
keys.add("textureCoordSetsMax");
values.add(new Integer(maxTexCoordSets));
diff --git a/src/classes/share/javax/media/j3d/Texture.java b/src/classes/share/javax/media/j3d/Texture.java
index 883d33a..5d7bc2c 100644
--- a/src/classes/share/javax/media/j3d/Texture.java
+++ b/src/classes/share/javax/media/j3d/Texture.java
@@ -642,20 +642,10 @@ public abstract class Texture extends NodeComponent {
}
int widthLevels;
- int heightLevels;
-
- if (VirtualUniverse.mc.enforcePowerOfTwo) {
- widthLevels = getPowerOf2(width);
- if (widthLevels == -1)
- throw new IllegalArgumentException(J3dI18N.getString("Texture2"));
-
- heightLevels = getPowerOf2(height);
- if (heightLevels == -1)
- throw new IllegalArgumentException(J3dI18N.getString("Texture3"));
- } else {
- widthLevels = getLevelsNPOT(width);
- heightLevels = getLevelsNPOT(height);
- }
+ int heightLevels;
+
+ widthLevels = getLevelsNPOT(width);
+ heightLevels = getLevelsNPOT(height);
((TextureRetained)this.retained).initialize(format, width, widthLevels,
height, heightLevels, mipMapMode, 0);
@@ -716,21 +706,11 @@ public abstract class Texture extends NodeComponent {
throw new IllegalArgumentException(J3dI18N.getString("Texture47"));
}
- int widthLevels;
- int heightLevels;
-
- if (VirtualUniverse.mc.enforcePowerOfTwo) {
- widthLevels = getPowerOf2(width);
- if (widthLevels == -1)
- throw new IllegalArgumentException(J3dI18N.getString("Texture2"));
-
- heightLevels = getPowerOf2(height);
- if (heightLevels == -1)
- throw new IllegalArgumentException(J3dI18N.getString("Texture3"));
- } else {
- widthLevels = getLevelsNPOT(width);
- heightLevels = getLevelsNPOT(height);
- }
+ int widthLevels;
+ int heightLevels;
+
+ widthLevels = getLevelsNPOT(width);
+ heightLevels = getLevelsNPOT(height);
if (boundaryWidth < 0 || boundaryWidth > 1)
throw new IllegalArgumentException(J3dI18N.getString("Texture30"));
diff --git a/src/classes/share/javax/media/j3d/Texture3D.java b/src/classes/share/javax/media/j3d/Texture3D.java
index 73e5a51..fec5886 100644
--- a/src/classes/share/javax/media/j3d/Texture3D.java
+++ b/src/classes/share/javax/media/j3d/Texture3D.java
@@ -78,15 +78,9 @@ public class Texture3D extends Texture {
super(mipmapMode, format, width, height);
int depthLevels = -1;
- if (VirtualUniverse.mc.enforcePowerOfTwo) {
- depthLevels = getPowerOf2(depth);
- if (depthLevels == -1)
- throw new IllegalArgumentException(J3dI18N.getString("Texture3D1"));
-
- } else {
- depthLevels = getLevelsNPOT(depth);
- }
-
+
+ depthLevels = getLevelsNPOT(depth);
+
// TODO : Need to verify whether this is a bug. Why depthLevels isn't
// use to determine maxMipMapLevels ? See also Texture.java
@@ -131,16 +125,7 @@ public class Texture3D extends Texture {
super(mipmapMode, format, width, height, boundaryWidth);
int depthLevels = -1;
- if (VirtualUniverse.mc.enforcePowerOfTwo) {
- depthLevels = getPowerOf2(depth);
-
- if (depthLevels == -1)
- throw new IllegalArgumentException(J3dI18N.getString("Texture3D1"));
- }
- else {
- depthLevels = getLevelsNPOT(depth);
-
- }
+ depthLevels = getLevelsNPOT(depth);
// TODO : Need to verify whether this is a bug. Why depthLevels isn't
// use to determine maxMipMapLevels ? See also Texture.java