Jump to content
  • Advertisement
Sign in to follow this  
stiopa

Drawing lines with rounded endings with Direct3D.

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

[font=Arial,]

Is there any way to draw a line using ID3DXLine with round endings? I am trying to draw a curve from number of line segments, but getting the empty areas where the line segments are connecting(the lines I am drawing are pretty thick). Performance here is essential.

Thanks!

[/font]

Share this post


Link to post
Share on other sites
Advertisement

[font="Arial,"][size="4"]Is there any way to draw a line using ID3DXLine with round endings? I am trying to draw a curve from number of line segments, but getting the empty areas where the line segments are connecting(the lines I am drawing are pretty thick). Performance here is essential.

[size="4"]Thanks!

[/font]


Probably not the best solution but you could draw decreasingly smaller lines in the same direction but smaller thickness with longer length / height it would create a rounded effect but it would take many more calls to your line drawing.


For instance say your line is 5 spaces in width
|||||
|||||

you draw another line 3 spaces in width farther than that line
|||
|||||
|||||


and do the same thing with a line 1 space in length
|
|||
|||||
|||||

Share this post


Link to post
Share on other sites

This method would really hurt my performance, wouldn't it ?


Its going to effect your performance some, in my example it would take a single line draw to 3.
I have not used ID3DXLine personally so I can't speak for the rendering speed, I would try it and see what it does.

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!