In addition to Blau's answer you could also generate a VertexBuffer
. What you would do is something like:
// Create the arrays to hold the data.
var vertices = new VertexPositionColorTexture[_points.Length * 2];
var indicies = new short[6 * (_points.Length - 1)];
for (var i = 0; i < _points.Length; i++)
{
var pt = _points[i];
// Calculate the texture coordinate along the horizontal plane.
var u = (float)_points.Length / i;
var vertexIndex = i * 2;
// Create the vertex at the top of the landscape
// that is at the current X co-ordinate.
vertices[vertexIndex + 0] = new VertexPositionColorTexture(
new Vector3(pt.X, pt.Y, 0),
Color.White,
new Vector2(u, 0)
);
// And the bottom.
vertices[vertexIndex + 1] = new VertexPositionColorTexture(
new Vector3(pt.X, _height, 0),
Color.White,
new Vector2(u, 1)
);
// Create indicies that will make two triangles that
// fill the *right* of the current vertex.
if (i < _points.Length - 1)
{
var indexIndex = i * 6;
indicies[indexIndex + 0] = (short)(vertexIndex + 0); // Top left
indicies[indexIndex + 1] = (short)(vertexIndex + 1); // Bottom left
indicies[indexIndex + 2] = (short)(vertexIndex + 3); // Bottom right
indicies[indexIndex + 3] = (short)(vertexIndex + 0); // Top left
indicies[indexIndex + 4] = (short)(vertexIndex + 3); // Bottom right
indicies[indexIndex + 5] = (short)(vertexIndex + 2); // Top right
}
}
_vertexBuffer = new VertexBuffer(GraphicsDevice, typeof(VertexPositionColorTexture), vertices.Length, BufferUsage.WriteOnly);
_indexBuffer = new IndexBuffer(GraphicsDevice, IndexElementSize.SixteenBits, indicies.Length, BufferUsage.WriteOnly);
_vertexBuffer.SetData(vertices, 0, vertices.Length);
_indexBuffer.SetData(indicies, 0, indicies.Length);
// To draw:
GraphicsDevice.Indices = _indexBuffer;
GraphicsDevice.SetVertexBuffer(_vertexBuffer);
_basicEffect.Texture = _myTexture; // Your texture
_basicEffect.World = _worldMatrix;
foreach (var item in _basicEffect.CurrentTechnique.Passes)
{
item.Apply();
GraphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, _vertexBuffer.VertexCount, 0, _indexBuffer.IndexCount);
}
This should create a vertex buffer that looks like this:

You should read up on BasicEffect if you want to learn how to set up textures during your rendering.