- fix texture repeat in MaterialExtensionLoader
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7810 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
ba85c7c9d9
commit
65de002a7a
@ -38,6 +38,7 @@ import com.jme3.material.Material;
|
|||||||
import com.jme3.material.MaterialList;
|
import com.jme3.material.MaterialList;
|
||||||
import com.jme3.scene.plugins.ogre.MaterialLoader;
|
import com.jme3.scene.plugins.ogre.MaterialLoader;
|
||||||
import com.jme3.texture.Texture;
|
import com.jme3.texture.Texture;
|
||||||
|
import com.jme3.texture.Texture.WrapMode;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
@ -75,7 +76,11 @@ public class MaterialExtensionLoader {
|
|||||||
String jmeParamName = matExt.getTextureMapping(aliasName);
|
String jmeParamName = matExt.getTextureMapping(aliasName);
|
||||||
|
|
||||||
TextureKey key = new TextureKey(texturePath, false);
|
TextureKey key = new TextureKey(texturePath, false);
|
||||||
|
key.setGenerateMips(true);
|
||||||
|
key.setAsCube(false);
|
||||||
Texture tex = assetManager.loadTexture(key);
|
Texture tex = assetManager.loadTexture(key);
|
||||||
|
// XXX: Is this really neccessary?
|
||||||
|
tex.setWrap(WrapMode.Repeat);
|
||||||
if (tex == null)
|
if (tex == null)
|
||||||
throw new IOException("Cannot load texture: " + texturePath);
|
throw new IOException("Cannot load texture: " + texturePath);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user