Dynamicaly Imported Texture are upside down

Hello,

I’ve got a trouble with imported texture, i figure out that they get upside down and mirror on x axis but i don’t know how to fix this.

Here is how i import texture :

[java]String path = openFile();
TextField niftyElement = nifty.getCurrentScreen().findNiftyControl(
“input”, TextField.class);
niftyElement.setText(path);
int separation = path.lastIndexOf(File.separator);
String dossier = path.substring(0,separation);
String Nfichier = path.substring(separation+1,path.length());

assetManager.registerLocator(dossier, FileLocator.class);
Material mat = new Material(assetManager,
“Common/MatDefs/Misc/Unshaded.j3md”);
mat.setTexture(“ColorMap”, assetManager.loadTexture(Nfichier));[/java]

and here the result with this image :

Hébergeur d'image

Hébergeur d'image

http://hub.jmonkeyengine.org/javadoc/com/jme3/asset/AssetManager.html#loadTexture(com.jme3.asset.TextureKey)
http://hub.jmonkeyengine.org/javadoc/com/jme3/asset/TextureKey.html#TextureKey(java.lang.String,%20boolean)

Wait till you start using cubemap textures… trying to get it working same way is a real pain :wink:

It works perfectly thanks for your help