• Advertisement
Sign in to follow this  

Algorythm to render 2D Grid with VertexArrays

This topic is 3908 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement