Sign in to follow this  
PrincessDaisy

CreateIndexBuffer only works with shorts!

Recommended Posts

PrincessDaisy    194
Im having a slight problem using CreateIndexBuffer on certain computers (all with quite low spec graphics cards) CreateIndexBuffer always succeedes when I use int's as the indices, but when I come to draw the buffer, nothing renders. If i chahge to shorts, then the Create functions succeeds and the buffer renders correctly. I am using the correct flags when creating the index buffer (informing DX if they are 16 or 32 bit values). I know this becuase it works fine on computers with quite high spec graphics cards. Has anyone else encountered this problem? Daisy

Share this post


Link to post
Share on other sites
Metron    268
Have you checked if the graphic cards support the 32 bit index lists ? AFAIK the low spec cards don't support that and have set a cap flag accordingly to this.

From the DirectX MSDN docs for CreateIndexbuffer : "The MaxVertexIndex member of the D3DCAPS9 structure indicates the types of index buffers that are valid for rendering."

And from the D3DCAPS9 description for MaxVertexIndex : " Maximum size of indices supported for hardware vertex processing. It is possible to create 32-bit index buffers; however, you will not be able to render with the index buffer unless this value is greater than 0x0000FFFF."

Hope this helps,
Metron

Share this post


Link to post
Share on other sites
PrincessDaisy    194
Yeah thats was the problem. I didnt actually understand that it was a limit placed on certain cards that yo couldnt use 32bit values, I only thought it realted to the number of indices.

Thanks for the answer

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