CreateIndexBuffer only works with shorts!

Started by
1 comment, last by PrincessDaisy 19 years, 6 months ago
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
________________________
Pretty In Pink
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
----------------------------------------http://www.sidema.be----------------------------------------
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
________________________
Pretty In Pink

This topic is closed to new replies.

Advertisement