Ejemplo n.º 1
0
        public static void Initialize(Game game)
        {
            graphicsDevice = game.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);
        }
Ejemplo n.º 2
0
        public static void Initialize( Game game )
        {
            graphicsDevice = game.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 );
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Draws the primitive.
 /// Same as calling PrimitiveBatch.Draw().
 /// </summary>
 public void Draw()
 {
     PrimitiveBatch.Draw(this);
 }