Jump to content
  • Advertisement
Sign in to follow this  
MrSparkle

Drawing lines and polygons

This topic is 4411 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'd like to draw lines and polygons on a terrain surface in my DirectX application. I'm looking for an approach to draw lines using Direct3D which eighter represents the line segments as polygons in 3d space or draws them to a texture that is mapped on the terrain surface. Which approach would you prefer? Does anyone know a good article or book which covers the basics of drawing lines, curves and polygons to start with? Thanks, Christian

Share this post


Link to post
Share on other sites
Advertisement
If you want to get started right away, you can try using ID3DXLine. It isn't the best, but it lets you draw both 2D and 3D lines (that is, lines in both screen space and world space).

If you want to make a custom line renderer, you can employ the line list or line strip primitive types. If you have a single polygon with a lot of segments, line strips work well. On the other hand, if you have a lot of individual, separate lines to draw, line lists are the way to go.

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.

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!