Algorythm to render 2D Grid with VertexArrays

Started by
-1 comments, last by GreyHound 16 years, 8 months ago
I need to calculate a vertex_array for a 2D grid. I tried using GL_TRIANGLE_STRIP but then realized it's not that easy. I'm not even sure if it's possible to render the whole thing with 1 array, since you need to somehow change the collum/row whenever you reach the end of the row/column (depending on the way you render). I think this work has been done a million times already. Anything you could suggest? I'm not sure if i should draw each row independently or to fall back to quads. I'm aware that terrain rendering is the perfect ressource for me to investigate but i wasn't really satisfied with the results. Mostly i see GL_TRIANGLES here, which is probably because TRIANGLE_STRIPS are not useful because of the reasons mentioned above. Anyone able to confirm? [Edited by - GreyHound on August 15, 2007 6:52:11 AM]

This topic is closed to new replies.

Advertisement