Exemple #1
0
 public static PrimitiveBatch getInstance(GraphicsDevice graphicsDevice)
 {
     if (instance == null)
     {
         instance = new PrimitiveBatch(graphicsDevice);
     }
     instance.updateProjection(graphicsDevice);
     return(instance);
 }
Exemple #2
0
        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();
        }