I want to make a simple 2d terrain with just a few bumps and height changes:

I thought about just using random numbers to describe the height of a certain vertex, but I don’t see how I can make one mesh from this. I’m looking for a way to find the vertex and indices buffers for the terrain.
How do I do this?
You could just use GL_POLYGON with a list of all the vertices with the first and last vertice below the view.
if you want to use a triangle mesh you’ll have to create a point directly below each height point(out of view) then the pattern(for clockwise ordering) would be:
then working out the indices depends on how you store the vertices, but there will be a similar pattern in the array.