About D3DCAPS9::MaxVertexIndex.

Started by
6 comments, last by Evil Steve 14 years, 11 months ago
D3DCAPS9::MaxVertexIndex indicates the max vertex index we can use. But I don't know what the index actually means. Is it the max number in index buffer or the final index used in DrawIndexedPrimitive offseted by BaseVertexIndex? Help!
Advertisement
It's the maximum numerical value that an index in an index buffer can have. In other words, it's the maximum size a vertex buffer can be.
I think that device may index much larger vertex buffer with BaseVertexIndex in DrawIndexedPrimitive(). With BaseVertexIndex, we may draw only a smaller part of a larger vertex buffer. Any other idears?
I try to merge several vertex buffer into a bigger buffer to minimize state change. This bigger buffer likely contains more vertices than MaxVertexIndex. When DrawIndexedPrimitive() is called, I pass BaseVertexIndex to offset vertex index. Is it possible? What does MaxVertexIndex mean? Is it max count of vertex buffer or the final index offseted by BaseVertexIndex?
I understood MaxVertexIndex to be the maximum index that you can put into an index buffer. If the driver only supports 16-bit indices then that value will be 65535, but if the driver supports 32-bit indices, that value will be between 65536 and 2^32. I didn't think that the MaxVertexIndex mattered for offsets from BaseVertexIndex, but I could be wrong.

I'll try to find out...
I have tried. I merged several meshes' vertex buffers into one large buffer which contains more than MaxVertexIndex vertices. With DrawIndexedPrimitive()'s BaseVertexIndex, meshes were drawed correctly. I hope that someone could do more careful test.
I don't know if you've seen this...

Go to:
"http://msdn.microsoft.com/en-us/library/bb219721.aspx"

and search for "MaxVertexIndex"
Quote:Original post by ddlox
I don't know if you've seen this...

Go to:
"http://msdn.microsoft.com/en-us/library/bb219721.aspx"

and search for "MaxVertexIndex"
That doesn't really explain if BaseVertexIndex affects this value though.

This topic is closed to new replies.

Advertisement