Jump to content
  • Advertisement
Sign in to follow this  

Algorythm to render 2D Grid with VertexArrays

This topic is 4018 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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!