VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
RE: D3D IM Corre (2 replies, 0 views) (2000-Apr-10) I use DrawIndexedPrimitive to draw them. It works like this: I read all the V values into an array. The f values are to be used as indexes into this array. Let's say you have this line
f 0 1 2
This means that you should draw a triangle using V values 0, 1 and 2
If you have this:
f 0 1 2 3
This means that you should draw two triangles, one using V values 0, 1 and 2, and one using values 2,3 and 0...
As long as you break the values up in triangles, you should be able to just send them to DrawIndexedPrimitive.
It is really a good idea to use DrawIndexedPrimitive, since this lets D3D take advantage of shared vertices=FASTER!
hope this helps
/Corre, MiCo Games
|