public static void Initialize(GraphicsDevice graphicsDevice) { PrimitiveBatch.graphicsDevice = graphicsDevice; graphicsDevice.SetBlendState(graphicsDevice.BlendStates.AlphaBlend); basicEffect = new BasicEffect(graphicsDevice); basicEffect.VertexColorEnabled = true; basicEffect.View = Matrix.Identity; basicEffect.World = Matrix.Identity; batch = new PrimitiveBatch <VertexPositionColor>(graphicsDevice); }
public static void Initialize(GraphicsDevice graphicsDevice) { PrimitiveBatch.graphicsDevice = graphicsDevice; graphicsDevice.SetBlendState(graphicsDevice.BlendStates.AlphaBlend); basicEffect = new BasicEffect(graphicsDevice); basicEffect.VertexColorEnabled = true; basicEffect.View = Matrix.Identity; basicEffect.World = Matrix.Identity; batch = new PrimitiveBatch<VertexPositionColor>(graphicsDevice); }
/// <summary> /// Draws the primitive. /// Same as calling PrimitiveBatch.Draw(). /// </summary> public void Draw() { PrimitiveBatch.Draw(this); }