adminIntroducing WPF 3.5 SP1 Graphics

Though only a service pack, the 3.5 SP1 release of Windows Presentation Foundation introduces a number of compelling new graphics features following a few key themes:

Interoperability

Interoperability between WPF and other technologies has been given a huge boost with work on two features: D3DImage and Write able Bitmap. D3DImage, introduced in 3.5 SP1 – brings first-class interoperability between Direct3D and WPF. Prior to D3DImage, D3D content could only be consumed by a WPF application via HWND hosting – a solution replete with caveats. D3DImage breaks through the Direct3D-WPF interop barrier by allowing live D3D content to be used in a WPF application as an Image Source – meaning it can be used anywhere native WPF content can be used.

WriteableBitmap has been substantially improved to allow for much more performant bitmap updates, allowing real-time system-memory bitmap manipulation with very little performance overhead. This unlocks a host of scenarios including directly painting WPF bitmaps with GDI and GDI+.

Performance

On the performance front, WPF has made strides in a number of key areas. Text performance has been substantially improved thanks to a massive refactoring of our text realization infrastructure. This can be seen most visibly when text is used in Visual Brushes and Drawing Brushes.

Performance of the most commonly used Bitmap Effects has been dramatically improved in many scenarios thanks to the use of pixel shaders. Both the Blur and Drop Shadow BitmapEffect classes have been updated to use hardware acceleration when possible, and a new Effect class and derived classes have been created, where built-in effects will reside moving forward.

Visual Richness

Even better, effects now support the use of custom pixel shaders, meaning application authors are free to let their creativity run wild in writing stunning new effects. Extensible ShaderEffects are fully integrated into the platform; they expose their pixel shader constant registers as regular Dependency Properties which can be animated, data bound, and used as any other DPs in WPF.

In the hands of talented artists and developers, the new graphics features in 3.5 SP1 will spur a wave of even richer and more compelling applications. The only question is how you will take advantage of these new capabilities!

Tags: , , , ,