Are the libgdx SpriteBatch begin and end methods expensive for the processor or make the performance slow if I call them multiple times?
For example:
public void render(float delta) {
GL10 gl = Gdx.gl10;
gl.glClearColor(0, 0, 0, 0);
gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
batch.begin();
//draw something
batch.end();
//do something before draw the others
batch.begin();
//draw others
batch.end();
//update
//controls
}
On the code above I just only call 2 times begin and end. But I want to do it 4 or 5 times....will this slow things down?