Jump to content
  • Advertisement
Sign in to follow this  
FireSoul

How to use D3DPT_LINESTRIP to create a box

This topic is 4875 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

Hi, i was wondering what is the best method to create a box with D3DPT_LINESTRIP, as the problem i have now is that i create a line that attaches one of the vertices to the previous one, which doesnt create a box, but just a line. Is there a way to make vertices to attach to another vertex? If so, is that the best way to create a box shape? (Using D3DPT_LINESTRIP with a vertex buffer with all the 8 points of the box, then attaching the points needed to make this look like a box). By the way this is all done on start-up. Thanks for any help given.

Share this post


Link to post
Share on other sites
Advertisement
hi,

I think, if you use a line strip, you will not be able to create a box with only 8 vertices, you'll have to duplicate some of them.
since three lines are going to each vertex, you'll even have to duplicate some lines just because of the linestrip.
if you don't want to draw tons of this cube, then you may better drawing it with a line list for simplicity.

kp

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!