Jump to content
  • Advertisement
Sign in to follow this  
MarkS

In what order are the polygons in a VBO drawn?

This topic is 3127 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

Yet another tile engine question... Each tile map in my engine is composed of one or more tile layers. The naive way to do this is to draw tile layer 0 (the bottom-most layer) followed by layer 1 and so on by separate calls to glDrawArrays. What I'd much rather do is combine all of them into a single VBO and simply draw that. The problem I see is that since I'm using alpha blending, depth testing is turned off. This precludes me from specifying separate z coordinates for each layer. What I'm wondering is how the array is parsed and drawn. Is it done linearly, from element 0 to element n or by some other method? If I were to set tile layer 0 as elements 0 to a and layer 1 and elements a to b and so on, would the layers be drawn correctly? [Edited by - maspeir on December 29, 2009 3:27:10 PM]

Share this post


Link to post
Share on other sites
Advertisement
Awesome! Thank you!

I could have coded this and found that out, but I sure would have hated to have wasted my time if it didn't.

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!