0
votes

To explain the Situation: I've got a LibGDX Game runnig without Problems as Desktop Project... But as soon as I install the App onto my Android device, It only shows the first screen... In this case, it is a Menu-Screen which obviously needn't much resouces...The Textures are not in resolutions of powers of two but I'm using OpenGl2.0.

When I'm now changing the Screen to the actual Game-Screen, my device just blackscreens. This Screen contains a Box2d World with lots of Objects, a big Texture(6500x877) and an animation. My guess is, that there are Problems concerning the abilities of my Processor(Nvidia Tegra2). Is there any chance of debugging the Game during taking a look at the CPU load? I can't use an Emulator cause this won't work with LibGDX.

1
Did you tried it with a smaller texture? That texture is to big for and mobile device i think. And yes you can activate the CPU load at your device at the development SettingsBennX
Note: Most mobile devices have a texture limit of around 2048x2048 and I believe 1024x1024 for some GPUs. If you are working with a single texture larger than these, there is no guarantee they will even load and you will not see them at all.Jyro117

1 Answers

1
votes

Use the OpenGL Tracer to get more information about what is going on: http://developer.android.com/tools/help/gltracer.html. Also: OpenGL debugging

The tracer tool requires that you're running on a recent Android release (4.1 or better)

You can also programmatically invoke Gdx.gl.glGetError() sporadically in your code to see if any OpenGL commands are triggering an error. See When Should One Call glGetError?

You can query the OpenGL runtime for the largest supported texture dimension with

IntBuffer max = BufferUtils.newIntBuffer(16); // See http://lwjgl.org/forum/index.php?topic=1314.0;wap2
max.clear();
gl.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, max);
int maxTexDim = max.get(0);

In your case I suspect you'll get 4096 or 2048 back ...