So, I noticed that my performance stats looked a little strange with tonegodgui elements attached - the “switches” stats are quite inflated. In my little testing room with an incomplete GUI, I’m looking at 16/16/23 and 9/9/27 for textures and shaders respectively. Not attaching the screen drops the switches down in line with the other stats.
I put together a test case with some panels and scroll adapters and found the same thing. Interestingly, panels didn’t cause any switching. I know several of the controls in my project contributed to the total, though, including buttons, sprites, and indicators.
Some numbers:
Blank screen:
2/2/2 (T), 3/3/3 (S), 2400fps
20 scroll adapters, no text:
4/4/42 (T), 5/5/63 (S), 1530fps
200 scroll adapters, no text:
4/4/402 (textures), 5/5/603 (shaders), 165fps
200 panels:
3/3/3 (T), 4/4/4 (S), 510fps
This isn’t causing me any problems right now, obviously, but if this is something I can fix, I definitely want to do so - I want to support low-end machines as much as possible. Am I missing a step somewhere? Is this just not something I should worry about?
Here’s the test case:
[java]
package tonegodtest4;
import com.jme3.app.SimpleApplication;
import com.jme3.math.Vector2f;
import com.jme3.renderer.RenderManager;
import com.jme3.system.AppSettings;
import tonegod.gui.controls.scrolling.ScrollAreaAdapter;
import tonegod.gui.core.Screen;
public class Tonegodtest4 extends SimpleApplication {
Screen screen;
public Tonegodtest4() {
AppSettings newSetting = new AppSettings(true);
newSetting.setFrameRate(-1);
setSettings(newSetting);
}
public static void main(String[] args) {
Tonegodtest4 app = new Tonegodtest4();
app.start();
}
@Override
public void simpleInitApp() {
flyCam.setEnabled(false);
screen = new Screen(this);
guiNode.addControl(screen);
for (int i = 0; i < 200; i++) {
//Panel panel = new Panel(screen, "panel"+i,new Vector2f(45, 45), new Vector2f(200, 200));
ScrollAreaAdapter panel = new ScrollAreaAdapter(screen, "scr"+i, new Vector2f(45, 45), new Vector2f(200, 200));
screen.addElement(panel);
}
}
@Override
public void simpleUpdate(float tpf) {
//TODO: add update code
}
@Override
public void simpleRender(RenderManager rm) {
//TODO: add render code
}
}
[/java]