Sign in to follow this  

depth sorting + texture/vertex/color arrays

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

This topic is 3120 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.

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