Gizmodo posts WPF + Direct2D Sample, wow!
You’ll never believe what I found in a bar tonight…
A USB key, with the following note taped to it:
This is a copy of the DX interop sample I’d like to share with the world, and I’d love your help. It consists of a VS10 solution with 4 projects:
The other two projects are the fun bits:
- SurfaceQueueInteropHelper (which probably needs a better name): this is a mixed-mode C++ assembly that provides APIs to managed your D3DImage, resizing, surface lost/regained and rendering callbacks.
- WpfD2DSample: Normal C# application that uses SurfaceQueueInteropHelper and managed D2D (via CodePack) to draw a simulated scatterplot, providing pan/zoom/LOD, as well as (logical) hit testing of the D2D content and WPF overlays (which is made much easier with surface interop (vs. HWND interop)). The piece de resistance would be to have a demo button that shows all of this working on the surface of a sphere or similar, but I haven't done that. :)
I think there's a lot more benefit to a .sln that you can unzip and run compared to a set of instructions like "Unzip this, then download the code pack, then make the following two changes, then import it into your sln, then...", etc.
Help me Obi-Wan, you are my only hope.
I have no idea what this all means, but I posted the solution .zip file here: http://robrelyea.com/demos/WPFDirect2DSample/WPFandDirect2DSample.zip
[Update: you need DirectX 9 SDK installed to use this sample.]
You like?