You can still use http://sharpdxwpf.codeplex.com/.
In order to work properly with SharpDX 2.5.0 you need to do a few modifications.
1) In project Sharp.WPF in class DXUtils.cs in method
Direct3D11.Buffer CreateBuffer<T>(this Direct3D11.Device device, T[] range)
add this line
stream.Position = 0;
just after
stream.WriteRange(range);
So fixed method looks like this:
public static Direct3D11.Buffer CreateBuffer<T>(this Direct3D11.Device device, T[] range)
where T : struct
{
int sizeInBytes = Marshal.SizeOf(typeof(T));
using (var stream = new DataStream(range.Length * sizeInBytes, true, true))
{
stream.WriteRange(range);
stream.Position = 0; // fix
return new Direct3D11.Buffer(device, stream, new Direct3D11.BufferDescription
{
BindFlags = Direct3D11.BindFlags.VertexBuffer,
SizeInBytes = (int)stream.Length,
CpuAccessFlags = Direct3D11.CpuAccessFlags.None,
OptionFlags = Direct3D11.ResourceOptionFlags.None,
StructureByteStride = 0,
Usage = Direct3D11.ResourceUsage.Default,
});
}
}
2) And in class D3D11 in file D3D11.cs
rename this
m_device.ImmediateContext.Rasterizer.SetViewports(new Viewport(0, 0, w, h, 0.0f, 1.0f));
into this
m_device.ImmediateContext.Rasterizer.SetViewport(new Viewport(0, 0, w, h, 0.0f, 1.0f));
i.e. SetViewports into SetViewport.
And it should work now.