Pages

Monday 23 July 2012

Metro, Direct2D and XAML – Burst of Performance in Windows 8

Now that Windows 8 Release Preview is out we are eager to explore the new framework and the features it offers. While part of it is the good old XAML, there are plenty of other unique features, one of them being the DirectX integration at XAML level. While XAML is a great technology and offers literally unlimited features regarding layout and UI richness, sometimes there are cases where we need to push the framework beyond its limits in order to achieve highly-performing components with responsive and fluid user interaction. Although in most cases writing efficient algorithms and using the proper data structures will be enough to achieve the desired performance, there are scenarios where extensive UI scenes are rendered frequently and the density of the updated pixels is high. So I was most excited by the opportunity to present Direct2D content directly in XAM and started a research on how it actually works and how the performance is affected.

WinRT is a brand new framework and there is little to no information over the Internet about Direct2D and XAML integration, so I decided to summarize my efforts and to hopefully help other people who are doing the same tests. In this post I will show you a simple C++ demo that uses Direct2D and a SurfaceImageSource instance to render a Polyline with 5000 points. Microsoft has done a great job with introducing three different entry points where DirectX content may be directly embedded in a XAML application. The demo also compares the same scenario implemented with a XAML Polyline shape.

Read full article here

No comments:

Post a Comment

Web Informer Button