Gui Image problem on mobile

Hello girls/guys!

I have a problem when I attach a picture to the guiNode on mobile.

My test code is just the BasicGame project in the JMonkeySDK.

In the simpleInitApp I added the following lines:

Picture picture = new Picture(“testPicture”);
picture.setPosition(0, 0);
picture.setWidth(300);
picture.setHeight(150);
picture.setImage(assetManager, “Textures/test.png”, true);
guiNode.attachChild(picture);

On pc it is working fine but on mobile the picture is mixed up.

PC:

mobile (sorry for the popup on the screenshot)

Does anybody have any idea what can be the problem?
Thanks

I’ve played around with jMonkey on android a few times and usually any issues are related to the configuration of the ROM or “developer settings”.

What phone are you testing on, and is it a custom rom?

Is your texture size a power of 2? I haven’t tried it myself, but I could have sworn there was an issue with using non-power of 2 textures on mobile.

1 Like

It is an old Galaxy S mobile. The problem was the texture size were not a power of 2.

Thank you very much you were right! I had to change the size to the power of 2.