When I am using the same spritebatch to draw texture and calling shaperenderer inside it, it is kind of misbehaving, like texture is not getting drawn or font is not getting drawn, Why is it happening?
For example(pseusdo code):
spritebatch.begin()
draw texture
shaperenderer.begin()
shaperenderer.end()
spritebatch.end()
but when I use it with different ends and begins it is drawing the way I want it to, but drawing so many spritebatches is reducing the performance of the phone.Reason I have to draw many spritebatches is because I want some texture to overlap on on some other shaperender's function.Any suggestions?