Wednesday, May 18, 2011

DirectX for WPF

Project Description

C# DirectX samples, based on SharpDX and rendering within a WPF user interface.
Making it easy for a C# / WPF developer to start learning and programing with DirectX
The purpose of this project is to provide a set of sample showing off DirectX in C# from a WPF developer perspective.

It is intended to be a starting point for any C# / WPF developer curious about DirectX.
It provide some vanilla implementation that get DirectX up and running in WPF.
It runs on SharpDX (pure C# DirectX wrapper), Alexandre Mutel's blog
There is a base library named SharpDX.WPF (not affiliated with SharpDX, but on top of it), that provides the following
A DXImageSource : D3DImage class that has implement SetBackBuffer() for D3D10, D3D11 Texture2D
A DXElement : FrameworkElement class that can render arbitrary DirectX content
Some vanilla Direct3D Device wrapper classes (D3D and its subclass) that implement the interface to attach to DXElement
Some useful Direct3D utility class. So far: FPS, ConstantBuffer, DeviceUtil
I also added the source code from Nexus and Meshellator which I hope to do something with later on
Also note that (currently) this library is used a hacked version of SharpDX (as explained in the project README)..
WARNING You will need the DirectX SDK to compile and run those sample.

Read more: Codeplex