What is the best way to draw lines with a variable amount of thickness in the new Direct3D?
Asked
Active
Viewed 1,281 times
3

Lightness Races in Orbit
- 378,754
- 76
- 643
- 1,055

xcrypt
- 3,276
- 5
- 39
- 63
-
http://stackoverflow.com/questions/2280077/direct3d-line-thickness http://msdn.microsoft.com/en-us/library/ff476342%28v=VS.85%29.aspx#Full – Lightness Races in Orbit Sep 10 '11 at 22:03
-
@Tomalak Geret'kal Please answer instead of reply so I can accept your answer. Thanks – xcrypt Sep 10 '11 at 22:09
-
@Tomalak Geret'kal What is your definition of an answer? – xcrypt Sep 10 '11 at 22:30
-
A statement/explanation/description of a solution to the stated problem. Read the SO FAQ. – Lightness Races in Orbit Sep 10 '11 at 22:32
-
I did. I didn't find anything saying that links are not allowed to be valid answers. (I could have overlooked it..) But if you don't want to answer, fine :P – xcrypt Sep 10 '11 at 22:43
-
http://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers – Lightness Races in Orbit Sep 11 '11 at 00:20
-
I slightly disagree, but I'm not going in detail because I think the discussion would take too much time and certainly not of life importance. I'll keep in mind though. Thanks – xcrypt Sep 11 '11 at 00:43
-
Feel free to join the discussion on that meta question if you disagree with the general concensus. I'm sure we'd be happy to hear your views. – Lightness Races in Orbit Sep 11 '11 at 01:03
1 Answers
1
The best way to draw patterned/thick lines (and 2D vector shapes generally) with Direct3D 11 is to use Direct2D. With DirectX 11.1 (Windows 8.x or Windows 7 SP1 with KB 2670838) it's trivial to use Direct2D on a Direct3D 11 device. Prior to that, you have to use Direct2D on a Direct3D 10.1 device and shared-surfaces with a Direct3D 11 device (see Surface Sharing Between Windows Graphics APIs)
See this post for some notes with the DirectX 11.1 on Windows 7 scenario.

Chuck Walbourn
- 38,259
- 2
- 58
- 81