Skip to main content
GameDev.net gamedev.net
🔒 Locked

A question on index buffer format

Started by littlekid Sep 5, 2005 at 6:05 AM 1 replies 1.1k views
Original Post
littlekid
littlekid
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?
Satook
Satook
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
What''s a cleaver?
Namethatnobodyelsetook
Namethatnobodyelsetook
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.