Jump to content
  • Advertisement
Sign in to follow this  
PrincessDaisy

CreateIndexBuffer only works with shorts!

This topic is 5040 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
Advertisement
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!