microsoft / WPFDXInterop

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

Get rid of shared surface of DX 9 #9

Open QuantumDeveloper opened 8 years ago

QuantumDeveloper commented 8 years ago

I see that now you create a shared surface handle to render from 11 dx to 9 (in which WPF is hosted), but shared surfaces has limitations such as only A8R8G8B8 format instaead of A10R10G10B10 or even A16R16G16B16. So, to fix this you need to get rid of sharing surface and create native DX 11 surface.

weltkante commented 8 years ago

You are aware that these limitations are there for performance, right? Considering how much you pointed at performance in your other comment you should be aware of that.

If you interop with WPF and mix your D3D content with WPF content then the formats must obviously be compatible, otherwise you have to pay for a format conversion for every frame, I doubt thats what you want.

And if you really want to pay for the format conversion you can just put it as the last step in your render pipeline anyways, outputting the format WPF needs.