locked
glLineWidth equivalent in Direct3D11

    Question

  • We're porting a desktop OpenGL app to Windows RT and have to translate OpenGL code to D3D11. In OpenGL, one can specify the line width with glLineWidth function, plain and simple. But we cannot find the analogue function in D3D11.1. Could someone kindly give some hints? Thanks.
    Friday, November 30, 2012 5:08 PM

Answers

  • Direct3D does not support 'wide-lines', only single-pixel lines. The Direct2D API provides vector-drawing support including sophisticated lines, and can easily interop with Direct3D 11.1 devices.

    • Proposed as answer by Jesse Jiang Wednesday, December 05, 2012 2:12 AM
    • Marked as answer by Jesse Jiang Friday, December 07, 2012 7:07 AM
    Friday, November 30, 2012 7:06 PM

All replies

  • Direct3D does not support 'wide-lines', only single-pixel lines. The Direct2D API provides vector-drawing support including sophisticated lines, and can easily interop with Direct3D 11.1 devices.

    • Proposed as answer by Jesse Jiang Wednesday, December 05, 2012 2:12 AM
    • Marked as answer by Jesse Jiang Friday, December 07, 2012 7:07 AM
    Friday, November 30, 2012 7:06 PM
  • Thanks Chuck.

    I think it's too bad the D3D does not provide this feature. As our app renders objects in 3D, D2D may not suffice. Could you recommend some 3rd party libraries that support 3D wide lines?

    Saturday, December 01, 2012 12:33 AM