benjcooley's picture

WPF OpenGL interop revisited with WGL_NV_DX_interop

I've looked around on the web, and discovered this recently:

What this means is that it should now be possible to provide proper seamless WPF interop with openGL (at least for NVidia cards) using the recently published WGL_NV_DX_interop extensions.

I suggested this a few months ago for SlimDX using the DX9Ex shared texture render target method, and they added this along with a sample for DX10 (which I promptly converted in my own code to DX11). This works extremely well, making DX a well behaved component of the WPF render stack, with no airspace issues.

The same technique should work just as well for OpenGL using these, eliminating the need to use WindowsFormsHost controls and completely eliminating the annoying airspace issues with current OpenGL WPF interop techniques.