I'm making custom menus and buttons (I don't want to use scene2D) and I have everything in atlases, but when I draw a button, if it has text, the texture binding is always x2 because of the switching back and forth between the texture in the atlas and the bitmapfont.
(example of drawing order)
public void draw(SpriteBatch b){
if(texture != null)
texture.draw(b);
if(text != null && !text.isEmpty())
font.draw(b, "TEXT", x, y);
}
So as you see, if I have 3 buttons, each button will increase the texture binding x2. When using several buttons, texture draw/bind is maybe around the number 24. This hasn't cause noticeable performance issues yet (FPS stay at 60~61) but I want to know how I can reduce the number of bindings when drawing textures and fonts at the same time.