public virtual void drawBundled(AsDrawingBlockCallback drawingBlock, int antiAliasing) { float scale = mActiveTexture.getScale(); AsContext3D context = AsStarling.getContext(); if (context == null) { throw new AsMissingContextError(); } sScissorRect.setTo(0, 0, mActiveTexture.getWidth() * scale, mActiveTexture.getHeight() * scale); context.setScissorRectangle(sScissorRect); if (getIsPersistent()) { AsTexture tmpTexture = mActiveTexture; mActiveTexture = mBufferTexture; mBufferTexture = tmpTexture; mHelperImage.setTexture(mBufferTexture); } mSupport.setRenderTarget(mActiveTexture); mSupport.clear(); if (getIsPersistent() && mBufferReady) { mHelperImage.render(mSupport, 1.0f); } else { mBufferReady = true; } try { mDrawing = true; if (drawingBlock != null) { drawingBlock(); } } finally { mDrawing = false; mSupport.finishQuadBatch(); mSupport.nextFrame(); mSupport.setRenderTarget(null); context.setScissorRectangle(null); } }