Jelajahi Sumber

- fix texture repeat in MaterialExtensionLoader

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7810 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 14 tahun lalu
induk
melakukan
65de002a7a

+ 5 - 0
engine/src/ogre/com/jme3/scene/plugins/ogre/matext/MaterialExtensionLoader.java

@@ -38,6 +38,7 @@ import com.jme3.material.Material;
 import com.jme3.material.MaterialList;
 import com.jme3.scene.plugins.ogre.MaterialLoader;
 import com.jme3.texture.Texture;
+import com.jme3.texture.Texture.WrapMode;
 import java.io.IOException;
 import java.util.Scanner;
 import java.util.logging.Level;
@@ -75,7 +76,11 @@ public class MaterialExtensionLoader {
             String jmeParamName = matExt.getTextureMapping(aliasName);
 
             TextureKey key = new TextureKey(texturePath, false);
+            key.setGenerateMips(true);
+            key.setAsCube(false);
             Texture tex = assetManager.loadTexture(key);
+            // XXX: Is this really neccessary?
+            tex.setWrap(WrapMode.Repeat);
             if (tex == null)
                 throw new IOException("Cannot load texture: " + texturePath);