/// <summary> /// If the <code>batchable</code> property is enabled, this method will add the batch /// to the painter's current batch. Otherwise, this will actually do the drawing. /// </summary> public override void Render(Painter painter) { if (_vertexData.NumVertices == 0) { return; } if (_pixelSnapping) { MatrixUtil.SnapToPixels(painter.State.ModelviewMatrix, painter.PixelSize); } if (_batchable) { painter.BatchMesh(this); } else { painter.FinishMeshBatch(); painter.DrawCount += 1; painter.PrepareToDraw(); painter.ExcludeFromCache(this); if (_vertexSyncRequired) { SyncVertexBuffer(); } if (_indexSyncRequired) { SyncIndexBuffer(); } _style.UpdateEffect(_effect, painter.State); _effect.Render(_indexData.NumTriangles); } }
public override void Render(Painter painter) { if (_pixelSnapping) { MatrixUtil.SnapToPixels(painter.State.ModelviewMatrix, painter.PixelSize); } painter.BatchMesh(this); }