microsoft / WPFDXInterop

Repo for WPF DX Interop support
MIT License
307 stars 98 forks source link

What's the differences between sharing Texture2D with original D3Dimage and the D3D11Image from this project? #30

Closed holance closed 7 years ago

holance commented 7 years ago

What's the differences between using DX11ImageSource to shared texture2D with original D3Dimage and the D3D11Image implementation from this project?

Is there any performance gain from using the D3D11Image or they are basically the same? Thanks.

weltkante commented 7 years ago

D3D11Image from this project uses the normal D3DImage for its implementation (the D3DImage is actually the base class for D3D11Image), so it just saves you from writing the Direct3D9 interop yourself.

The DX11ImageSource you linked seems similar to this projects D3D11Image, also just wrapping D3DImage and managing the D3D9 interop. If anything it looks like it does less error checking so you may get into trouble if something goes wrong with DX11ImageSource and you try to recover from an exception.

I wouldn't expect any significant performance differences between the 3 classes, they basically all do the same, namely sharing a surface with a D3D9 device.