public static PrimitiveBatch getInstance(GraphicsDevice graphicsDevice) { if (instance == null) { instance = new PrimitiveBatch(graphicsDevice); } instance.updateProjection(graphicsDevice); return(instance); }
public void render(GraphicsDevice graphicsDevice, Matrix transform, RenderHints hints) { PrimitiveBatch primBatch = PrimitiveBatch.getInstance(graphicsDevice); primBatch.Transform = transform; primBatch.Begin(hints.PrimitiveType); VectorSet vSet = calculateTrans(); vSet.forEachVector(v => { primBatch.AddVertex(v, hints.Color); }); primBatch.End(); }