Skip to main content
gamedev.net
🔒 Locked

Mesh vertices problem

Started by eudora 1 reply 850+ views
Original Post
eudora
eudora
I am working on a maya model and exported it as .x format. In Maya, the vertices are ordered bottom up. So the first 3 vertices of a cube in maya is something like the top left model on the picture below. However in DirectX, the vertices are drawn in triangle faces, so the order of the first 3 vertices is something like the bottom right model on the picture below. Top left is Maya cube, bottom right is DirectX cube Is there a way for me to make DirectX order the vertices like in Maya?
Sages
Sages
What you most likely need is what's known as an Index Buffer. Have a gander at:

IDirect3DIndexBuffer9
IDirect3DDevice9::CreateIndexBuffer()
IDirect3DDevice9::SetIndices()
IDirect3DDevice9::DrawIndexedPrimitive()

Good luck and feel free to ask further questions.
eudora
eudora
I just realise its pretty pointless for me to do this as Maya seems to order the vertices in a strange manner. I will just track the position of the vertices in Maya then double check to get a reference id of that vertex in DirectX.

:)

Thanks

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.