Sign in to follow this  

CreateIndexBuffer only works with shorts!

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

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
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

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