Clipping
Rectangle scissors = new Rectangle();Rectangle clipBounds = new Rectangle(x,y,w,h);ScissorStack.calculateScissors(camera, spriteBatch.getTransformMatrix(), clipBounds, scissors);if (ScissorStack.pushScissors(scissors)) { spriteBatch.draw(...); spriteBatch.flush(); ScissorStack.popScissors();}
spriteBatch before starting the active scissor region (that is, before calling ScissorStack.pushScissors) to prevent queued draw calls from before the scissor start getting flushed inside the active scissor region.
all of the rectangles will be rendered.
