I wanted to share with you this example about how to use a Direct3D surface within openFrameworks.
The code is there : https://github.com/secondstory/ofDxSharedTextureExample
This example is only intended to show the simplest way of using the WGL_NV_interop extension.
For those who wonders what’s the point of all that : windows and openGL are not the best friends, which is making certain things involving hardware acceleration a tough thing to do.
This sample code was developed for a bigger purpose: using Windows Media Foundation to read HD and Ultra-HD video in an efficient fashion. I’ll post more on that in the upcoming days
Other usage of this could be : grabbing the texture of any window in windows and display it in oF (sort of the Syphon way I guess), building a hardware accelerated pipeline for CEF, …
I tested it on a couple of NVIDIA cards and it’s advertised to be working on ATI ones as well.
I hope some people will find this useful, and any thought/comment about all this will be greatly appreciated.