I’m creating a simple program that draws data from a vertex array using glDrawArrays(), in the array are single points that will be used to make a heightmap. However the only way I can get an understandable output is to draw GL_POINTS, if I use any other primitive, i.e. GL_QUADS, I get lots of random polygons. I’m assuming this is because you need to group the data in the vertex array? e.g. the first 4 points would make up the 4 corners of a quad, the second 4 would make another quad. However this would involve creating extra entries in the array because when the quads are next to each other they will share the same point.
Now my problem is that my array will be huge (possibly hundreds of thousands of points) so I want to limit repeated entries. So my other choice is to use an index array and use glDrawElements() or something simlar, but then I would have 2 huge arrays; vertex and indices.
What would be the best way to go about this?
Thanks for any advice?