Archived

This topic is now archived and is closed to further replies.

Axiverse

Jumping in Vertex Buffers

Recommended Posts

Axiverse    366
I''m just wondering how to draw a line connecting 2 points not directly next to each other Situation: I have 4 points and I want to make a rectangle, the first three are connected, but i still have to connect the first with the last. Is there any way to do this? Can you do it with DrawIndexedPrimitives?? (I don''t know how to use this or what it is for.. it just crashed my com when I tryed) or something else?? Thanks

Share this post


Link to post
Share on other sites
Wavewash    202
lets say you have an array of points

1 2 3 4

and you want to draw a line between point 1 and 4. You create a index buffer which holds indexs and give it the index of the points from your point array in the order you want to draw. In this case:

1 and 4

then call drawindexedprimitive and tell it to draw using your indicies and vertex stream. That's the basic idea. Look at the docs for more info.

~Wave

[edited by - Wavewash on March 21, 2004 6:37:31 PM]

Share this post


Link to post
Share on other sites