Sign in to follow this  
fathom88

Interlaced Versus Non-Interlaced Vertex Array Question

Recommended Posts

I have a question regarding vertex arrays. Are interlaced vertex arrays that much quicker than non-interlaced arrays? I know the interlaced one is faster. Is it worth the trouble converting my code to use the interlaced version? Thanks.

Share this post


Link to post
Share on other sites
Quote:
Original post by fathom88
I have a question regarding vertex arrays. Are interlaced vertex arrays that much quicker than non-interlaced arrays? I know the interlaced one is faster. Is it worth the trouble converting my code to use the interlaced version? Thanks.

And I wonder where you got your information. If by interlaced and non-interlaced arrays you mean glInterleavedArrays and glVertexPtr, etc., then ASFAIK the two will perform identically. Modern implementations of interleaved arrays are actually implemented by calling glVertexPtr, etc.

Hope this helps,

SwiftCoder

Share this post


Link to post
Share on other sites
Having the different arrays interleaved in memory is a good idea because the drivers don't have to jump all over the place in memory to access it, making the cache much more effective. You can still use gl*Pointer calls with interleaved data (and I would recommend not using glInterleavedArrays because it has a very limited selection of vertex formats). If it's worth it depends entirely on what you need from your application, how it is designed, and how much trouble converting it would cause you.

Share this post


Link to post
Share on other sites
Quote:
Are interlaced vertex arrays that much quicker than non-interlaced arrays?

from memory from my testing theyre about 3%quicker in benchmarks
but in my real world app theres no real speed difference between the 2

Share this post


Link to post
Share on other sites
Quote:
Original post by zedzeek
from memory from my testing theyre about 3%quicker in benchmarks
but in my real world app theres no real speed difference between the 2


I would imagine that that's simply because you've got your bottleneck elsewhere (CPU logic, Fillrate, etc.) in a real world App. Still, the point remains that most drivers do seem to be optimized for interlaced buffers, so may as well use them. If you do happen to run into that odd configuration where vertex processing IS indeed the bottleneck, they'll thank you for that extra 3% performance.

Just for kicks, you may find an older thread I started about a similar question interesting. Phantom gives a good explanation about the whole thing. See the thread here.

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