Reputation: 9914
When I use Shaperenderer, I can see what I am drawing between the shaperender block. No problem. But it is not displaying the sprite using b.renderMap
. This is the following code:
b.drawBoard(batch, shapeRenderer,camera);
batch.begin();
b.renderMap(batch);
batch.end();
Shaperendere block:
shapeRenderer.setProjectionMatrix(camera.combined);
shapeRenderer.begin(ShapeType.FilledRectangle);
shapeRenderer.setColor(Color.PINK);
shapeRenderer.filledRect(0, 0, width, height);
shapeRenderer.setColor(Color.GRAY);
shapeRenderer.filledRect(10, 20, width-30, height-10);
shapeRenderer.end();
If I comment shapeRenderer blo
ck , I am able to see my sprite. Any idea?
Thanks
Upvotes: 0
Views: 57
Reputation: 1736
I know that it's necessary to do
batch.end()
before you draw shapeRender. And do
batch.begin()
after. Maybe problem somewhere there.
Upvotes: 1