Ver código fonte

Remove requirement for buffer type images to have width=height on Android devices that do not support NPOT. Now images allowed as long as both height and width are POT on devices that don't support NPOT.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9744 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
iwg..ic 13 anos atrás
pai
commit
fa6716877e

+ 1 - 1
engine/src/android/com/jme3/renderer/android/TextureUtil.java

@@ -253,7 +253,7 @@ public class TextureUtil {
         
         if (!NPOT) {
             // Check if texture is POT
-            if (!FastMath.isPowerOfTwo(width) || width != height) {
+            if (!FastMath.isPowerOfTwo(width) || !FastMath.isPowerOfTwo(height)) {
                 throw new RendererException("Non-power-of-2 textures "
                         + "are not supported by the video hardware "
                         + "and no scaling path available for image: " + img);