Jump to content
  • Advertisement
Sign in to follow this  
underthesun

depth sorting + texture/vertex/color arrays

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

So I'm developing a 3D game for the iPhone, and it's a 3D game. I've been using texture/vertex/color arrays for their supposed increase in performance, as opposed to drawing each billboarded sprite by itself. Never had a chance to test the performance increase though.. And then came the time when I needed to have them depth sorted. But then again, if sorted by depth, you can't really bunch the drawings together in an array, unless the arrays themselves are depth sorted, and everythign uses a single texture (maybe atlassed). So yeah, has anyone ever encountered this situation? I'm working through the depth sort algorithm right now, it's a bit tedious, and I have a feeling I'm not doing the right thing :(

Share this post


Link to post
Share on other sites
Advertisement
Hmm, so dynamic VBOs..

I actually managed to finish implementing the sorting system, and sorting around my texture/color/coord array was quite slow, will dynamic VBOs help this? Are dynamic VBOs sortable effectively? The slow bit was physically moving the array elements, since I put the indexes on a separate array to sort.

Can dynamic VBOs do what I did faster? Seems like there's no functions in opengl ES that lets you swap around parts of a VBO (for sorting)..

Then again right now I'm just limiting the amount of depth sorted sprites, probably a better solution.. the rest of the sprites will not have alpha, just blank pixels (removed by glAlphaFunc).

Share this post


Link to post
Share on other sites
You don't need depth sorting on IPhone hardware, it uses a different rendering method, than normal PC videocards, that makes depth sorting unnecessary.

Share this post


Link to post
Share on other sites
As far as I know you don't need dept sorting on pc hardware either, unless it is for transparent objects. I don't think that this is any different on the iPhone.

Can you tell me what other rendering method is used on the iPhone, sirpalee?

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!