Jump to content
  • Advertisement
Sign in to follow this  
schupf

DX10: Line

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

Ok, this may be a trivial question, but how can I draw lines in DX10? I can't use the old ID3DXLine class from DX9 and it looks like DX10 has no built in support for line-drawing. While I could render lines with vertices and primitive type D3D10_PRIMITIVE_TOPOLOGY_LINELIST, this won't be flexible, since I can't configure the width of the line (I guess. I did not try it but I haven't found any information how to configure line width). Since I don't want to reinvent the wheel I want to ask you how you draw lines in DX10. Any samplecode or links to information are appreciated!

Share this post


Link to post
Share on other sites
Advertisement
Theoretically, you'd use a geometry shader to create triangles which follow the line and have the desired width. However, I don't know of an implementation of this.

Share this post


Link to post
Share on other sites
I remember there being some heated arguments between the CAD developers and the DX team in the early days of D3D10 about this. You can probably dig up the details on MSDN forums, but I have a recollection it was about priorities - no one needed/wanted it so they didn't port it across. Various things seem to have got the cut between D3DX9 and D3DX10 this way...

As Eyal suggests, a GS is your best bet and likewise I don't know of any ready-to-rock examples.

hth
Jack

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!