Domanda

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.

È stato utile?

Soluzione

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 ...

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top