LibGDX: Sprites not showing on Android?

时间:2016-07-11 19:44:16

标签: android graphics libgdx

On Samsung S6, sprites are not being shown (textures of the UI skin are).

However, everything works fine in the Desktop application, and on another phone (Samsung S3 Mini).

My images are sized in power-of-two, and have no bigger resolutions than 512x512.

Why does it not work on S6? How can I make it work?

How I load images:

I have many textures and I load them with AssetManager, like so:

manager.load(STRING_PATH_1, Texture.class, paramBG);
manager.load(STRING_PATH_2, Texture.class, paramBG);

How I draw images: I draw them as Sprite objects:

sprite = new Sprite(Assets.manager.get(Assets.BTN_START, Texture.class));
sprite.setPosition(x, y);
sprite.setSize(radius * 2, radius * 2);

In render():

sprite.draw(batch);

How I dispose images: I do not do that yet, because I am lazy, I want to handle that a little bit later. (Please tell me if this could be relevant for that problem!)

0 个答案:

没有答案