Dynamicaly Imported Texture are upside down


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);
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,
mat.setTexture(“ColorMap”, assetManager.loadTexture(Nfichier));[/java]

and here the result with this image :

Hébergeur d'image

Hébergeur d'image


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