Example #1
0
 private void RenderVertices(Microsoft.Xna.Framework.Graphics.GraphicsDevice GraphicsDevice, Texture2D texture2D, VertexPositionNormalTexture[] vertices, float alpha = 1f)
 {
     Effect.Texture = null;
     Effect.Texture = texture2D;
     if (alpha < 1f)
     {
         Effect.GraphicsDevice.BlendState = BlendState.Additive;
     }
     Effect.Alpha = alpha;
     foreach (EffectPass pass in Effect.CurrentTechnique.Passes)
     {
         pass.Apply();
         GraphicsDevice.DrawUserPrimitives <VertexPositionNormalTexture>(PrimitiveType.TriangleList, vertices, 0, 2);
     }
 }