import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
import com.badlogic.gdx.math.MathUtils;\r
import com.badlogic.gdx.scenes.scene2d.Stage;\r
+import com.badlogic.gdx.scenes.scene2d.ui.Button;\r
+import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
import com.badlogic.gdx.scenes.scene2d.ui.Skin;\r
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;\r
import com.badlogic.gdx.tests.utils.GdxTest;\r
\r
@Override\r
public void create () {\r
- stage = new Stage(0, 0, false, new SpriteBatch(10000));\r
+ stage = new Stage(0, 0, false, new SpriteBatch());\r
Skin skin = new Skin(Gdx.files.internal("data/uiskin.json"), Gdx.files.internal("data/uiskin.png"));\r
- for (int i = 0; i < 10000; i++) {\r
+ for (int i = 0; i < 100; i++) {\r
TextButton t = new TextButton("Button"+i, skin);\r
t.x = MathUtils.random(0, Gdx.graphics.getWidth());\r
t.y = MathUtils.random(0, Gdx.graphics.getHeight());\r
stage.draw();\r
Gdx.app.log("X", "FPS: "+Gdx.graphics.getFramesPerSecond());\r
Gdx.app.log("X", "GL20: "+Gdx.graphics.isGL20Available());\r
- Gdx.app.log("X", "Batches: " + stage.getSpriteBatch().maxSpritesInBatch);\r
+ Gdx.app.log("X", "render calls: " + stage.getSpriteBatch().totalRenderCalls);\r
+ stage.getSpriteBatch().totalRenderCalls = 0;\r
}\r
\r
@Override\r