Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Achieving high performance 2D graphics with Direct2D

23 minutes, 46 seconds


Right click “Save as…”

Slides (view online)
Make it fast! Great performance is a huge motivator of satisfaction and user preference with apps. Direct 2D powers high-performance 2D graphics rendering in Windows 8. In this session, you will learn advanced techniques for optimizing your Direct2D code for maximum speed and efficiency in your apps.

Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
  • We are finding that the documentation for Direct2D is not sufficiently enough to develop complex graphics intensive applications. This is a good start but we need significantly more to enable us to be quickly productive as developers with Direct2D. 

    The application we are attempting to develop is for GIS - so we are basically pushing very large amounts of complex holed polygons (potentially thousands of points with thousands of polygons), polylines, texts and symbols. We are finding the performance of polygon rendering and the outlines to be insufficient with Windows 7.

    We suspect that the use case scenarios for Direct2D do not  consider this type of complex application (at least on Windows 7).

    We are achieving with OpenGL between 30 to 60 frames faster than Direct2D with the same architecture and geometry input. I do however need to review the performance tips in this video and apply these. Hopefully I will see a speed up.

    I hope that by knowing what we are attempting to achieve then you will consider this in performance testing/improvements.

  • evildictaitorevildictait​or Devil's advocate

    @damiandixon: If you're doing complex 3D geometry you probably shouldn't be using Direct2D to do it. Direct3D will always always be faster at doing graphics than OpenGL on Windows because Direct3D is a thin layer to the graphics driver's HAL, and OpenGL on Windows thunks to Direct3D anyway.

  • While you may be correct about using Direct2D for complex geometry you are sadly mistaken about OpenGL.

    On Windows Vista/Windows7/Windows8 OpenGL does not call through to DirectX to implement the functionality. Microsoft originally proposed this but backed out under pressure from the IT industry.

    OpenGL is implemented by the Graphics Card manufacturers and has direct access to the hardware.

  • @damiandixon:

    I was having the exact same performance problems you mentioned, as we also work with GIS and I was trying out Direct2D to see how it behaved. See here: http://stackoverflow.com/questions/4055456/is-tdirect2dcanvas-slow-or-am-i-doing-something-wrong

    At best Direct2D ended-up being a little faster than GDI, but not significantly, when working without anti-aliasing.

    OpenGL on the other hand allows for real-time rendering (~70fps on the same PC) of our geographic data with 4x anti-aliasing.

  • FrankieCFrankieC The Mad Code Crunching Pianist

    Good FAST overview of D2D.  Should be enough to get me going for what I need to do.  Thanks!

  • @trinidad

    Thanks for the link. 

    My problem is I need the line joins and anti-aliasing as well as working on a Server.

    I suspect I will have to do Direct3D and OpenGL. A pity really as I also need to draw on a Server as a Service which means OpenGL and Direct3D can not normally be used (problems getting an Accelerated Context).

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.