Jump to content
  • Advertisement


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


Jumping in Vertex Buffers

This topic is 5234 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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.


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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!