I am trying to profile my LibGDX game, It runs on 60FPS on PC and 42-45 FPS on MY mobile phone. Either I improve performance and raise it to 60, or lock it at 30 (I don´t want to do this).
I have found GLProfiler on the LibGDX wiki, and I am giving it a try. (GLProfiler)
Here is how I am using it:
@Override
public void render(float stateTime)
{
//my Render Code
System.out.println(
" Drawcalls: " + GLProfiler.drawCalls +
", Calls: " + GLProfiler.calls +
", TextureBindings: " + GLProfiler.textureBindings +
", ShaderSwitches: " + GLProfiler.shaderSwitches +
"vertexCount: " + GLProfiler.vertexCount.value
);
GLProfiler.reset();
}
with GLProfiler.enable() on the create() function.
with GLProfiler.disable() on the dispose() function.
And this is my output:
Drawcalls: 35, Calls: 666, TextureBindings: 35, ShaderSwitches: 60, vertexCount: 36.0
Drawcalls: 33, Calls: 626, TextureBindings: 33, ShaderSwitches: 56, vertexCount: 36.0
Drawcalls: 33, Calls: 626, TextureBindings: 33, ShaderSwitches: 56, vertexCount: 36.0
Drawcalls: 33, Calls: 626, TextureBindings: 33, ShaderSwitches: 56, vertexCount: 36.0
Drawcalls: 33, Calls: 626, TextureBindings: 33, ShaderSwitches: 56, vertexCount: 36.0
Drawcalls: 33, Calls: 626, TextureBindings: 33, ShaderSwitches: 56, vertexCount: 36.0
Drawcalls: 35, Calls: 666, TextureBindings: 35, ShaderSwitches: 60, vertexCount: 36.0
Drawcalls: 35, Calls: 666, TextureBindings: 35, ShaderSwitches: 60, vertexCount: 36.0
Drawcalls: 35, Calls: 666, TextureBindings: 35, ShaderSwitches: 60, vertexCount: 36.0
Drawcalls: 35, Calls: 666, TextureBindings: 35, ShaderSwitches: 60, vertexCount: 36.0
Drawcalls: 33, Calls: 626, TextureBindings: 33, ShaderSwitches: 56, vertexCount: 36.0
Drawcalls: 33, Calls: 626, TextureBindings: 33, ShaderSwitches: 56, vertexCount: 36.0
This is just a couple frames, enough for the example.
I have been looking for information on how to read these numbers, I found nothing.
Do you guys know how can I learn from this information? (Identify problems maybe?)