Introducing Direct2D 1.1 (and DirectX 11.1)

My latest column for the May 2013 issue of MSDN Magazine is now available online.

Direct2D 1.1 might sound like a minor version update, and in some ways, it is. It doesn’t fundamentally change the API. Everything you know about Direct2D continues to be every bit as relevant today. It’s still modeled around device-specific and device-independent resources, render targets, geometries, brushes and so on. But in version 1.1, Direct2D grows up. The original version of Direct2D that launched with Windows 7 was in some ways an outsider to DirectX. It lagged behind, being tied to DirectX 10 rather than 11, the version of DirectX that it launched with. Even though it provided an excellent interop story for GDI and the Windows Imaging Component, it didn’t provide the best possible experience for working with DirectX itself. It wasn’t bad, but in Direct2D 1.1 things get a whole lot better. Direct3D and Direct2D are now in many ways siblings in the DirectX family. Thanks to this greater parity, even more of the graphics processing unit (GPU) is now available to the Direct2D developer without the need to jump out of the 2D abstraction. Moreover, when you do need to make the leap, it’s both simple and efficient.

Check out my latest course on Pluralsight for a crash course on DirectX 11.1 and Direct2D 1.1!

You can find links to more of my articles here.


6 thoughts on “Introducing Direct2D 1.1 (and DirectX 11.1)

  1. Gary Harper

    What is the best way to handle an application where a main window contains several child windows (or custom controls) that each do their own custom drawing via Direct2D? Would child contrl each create its own Direct2D device? Would the main window create and share a single Direct2D device between all of them? I would like to create several custom drawn animated controls using Direct2D for rendering be able to use them like any other windows control. But, I have heard that creating multiple devices (at least for Direct3D) is not the most efficient way to go.

    1. Kenny Kerr Post author

      You should experiment with different options. It’s certainly possible for each child control to have both its own Direct3D device and Direct2D device. You can of course share a Direct3D device among different controls. That would be more efficient, but you may find that for your needs it is sufficient and simpler to keep them separate.

  2. Niko Barli

    Hi, is it now possible to use hardware-accelerated Direct2D on session 0 processes (similar to Direct3D 11.1) ?

      1. Niko Barli

        Hi, thanks for the reply. I experimented with Direct2D and confirmed that it can be used on session 0 processes.

        Please let me ask you another question. In what kind of scenario that Direct2D can deliver much better performance than GDI or GDI+. I experimented a bit with DrawLine primitives and both Direct2D and GDI+ seems to deliver similar performance (approx 60,000 draws/s). Interestingly with D3D_DRIVER_TYPE_WARP (without HW acceleration) the performance of Direct2D is better (approx 150,000 draws/s) but it consumes a lot of CPU power.

  3. Yassine

    hi, is it possible to use direct2d to draw under an existing window, for example a powerpoint slide.thx


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s