OgreXML: Use the placeholder texture for missing textures
This commit is contained in:
parent
dd66d21147
commit
85bba59541
@ -140,7 +140,7 @@ public class MaterialLoader implements AssetLoader {
|
||||
textures[texUnit].setImage(loadedTexture.getImage());
|
||||
textures[texUnit].setMinFilter(loadedTexture.getMinFilter());
|
||||
textures[texUnit].setKey(loadedTexture.getKey());
|
||||
|
||||
|
||||
// XXX: Is this really neccessary?
|
||||
textures[texUnit].setWrap(WrapMode.Repeat);
|
||||
if (texName != null){
|
||||
@ -151,7 +151,7 @@ public class MaterialLoader implements AssetLoader {
|
||||
}
|
||||
} catch (AssetNotFoundException ex){
|
||||
logger.log(Level.WARNING, "Cannot locate {0} for material {1}", new Object[]{texKey, matName});
|
||||
textures[texUnit].setImage(PlaceholderAssets.getPlaceholderImage());
|
||||
textures[texUnit].setImage(PlaceholderAssets.getPlaceholderImage(assetManager));
|
||||
textures[texUnit].setKey(texKey);
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class MaterialExtensionLoader {
|
||||
tex.setWrap(WrapMode.Repeat);
|
||||
} catch (AssetNotFoundException ex){
|
||||
logger.log(Level.WARNING, "Cannot locate {0} for material {1}", new Object[]{texKey, key});
|
||||
tex = new Texture2D( PlaceholderAssets.getPlaceholderImage() );
|
||||
tex = new Texture2D( PlaceholderAssets.getPlaceholderImage(assetManager) );
|
||||
tex.setWrap(WrapMode.Repeat);
|
||||
tex.setKey(texKey);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user