public override void render(AsRenderSupport support, float parentAlpha) { if (mFlattenedContents != null || mFlattenRequested) { if (mFlattenedContents == null) { mFlattenedContents = new AsVector <AsQuadBatch>(); } if (mFlattenRequested) { AsQuadBatch.compile(this, mFlattenedContents); mFlattenRequested = false; } float alpha = parentAlpha * this.getAlpha(); int numBatches = (int)(mFlattenedContents.getLength()); AsMatrix mvpMatrix = support.getMvpMatrix(); support.finishQuadBatch(); support.raiseDrawCount((uint)(numBatches)); int i = 0; for (; i < numBatches; ++i) { AsQuadBatch quadBatch = mFlattenedContents[i]; String blendMode = quadBatch.getBlendMode() == AsBlendMode.AUTO ? support.getBlendMode() : quadBatch.getBlendMode(); quadBatch.renderCustom(mvpMatrix, alpha, blendMode); } } else { base.render(support, parentAlpha); } }
public override void render(AsRenderSupport support, float parentAlpha) { support.finishQuadBatch(); support.raiseDrawCount(); renderCustom(support.getMvpMatrix(), getAlpha() * parentAlpha, support.getBlendMode()); }