Sign in to follow this  

A question on index buffer format

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

Just wondering should i use a 32bit index buffer instead of a 16 bit index buffer Since with 16 bit i used WORD index[] means the max value for a index is 65536 If i use 32 bit i used int index[] meaning the max value for a index is 4294967296 which is alot compared to 65536 Should i use a 32 bit index incase the mesh have more than 65536 vertices?

Share this post


Link to post
Share on other sites
guess it depends on whether the meshes you're working with will be large enough that the 65k limit is a problem. I know for the ones I work with it's not :)

You could make a hybird system that uses the smaller one if the mesh will fit, else it uses 32-bit indexes. Wouldn't take much time, is simply a check when you load the mesh.

Hope it helps,
Andrew

Share this post


Link to post
Share on other sites
Lots of cards don't support 32 bit indices, and a few of the early 32-bit index cards got a huge performance penalty when using 32 bit indices.

If your game doesn't need 32 bit indices, don't use them.

If you need 32 bit for just a few meshes, instead try to break those meshes into a few smaller sections, and keep using 16 bit indices.

If the majority of your game needs 32 bit indices, odds are that the older cards aren't going to run your game at a playable framerate anyway, so go ahead and use 32 bit.

As with everything in D3D, the features you use depend on who you expect to use your app.

Share this post


Link to post
Share on other sites

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