Sign in to follow this  

Algorythm to render 2D Grid with VertexArrays

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this