Hi all
Has anyone tried the WGL_NV_DX_interop extension from NVIDIA?
I’m working on this on and off for a few days now. I’ve managed to get the extensions loaded, and set up a shared texture I created in DX9.
My problem is when I try to attach this texture to a framebuffer object, I get FrameBufferUnsupported error.
Did anyone have any success using this extension to render from OpenGL on a DirectX texture?

What’s the format of the texture?

What’s the real benefit of this extension?

Does it mean that Direct3D and GL context can co-exist in the same application window?

The main purpose currently is probably using DX video decoders inside OpenGL. I tried to reuse VBOs created in D3D inside OpenGL half year ago, and it worked…

The purpose is to allow integration of openGL graphics with WPF.
The main flow is:

  1. Create a d3d surface as the render target (ARGB32, no multisample).
  2. setup the interop with OpenGL as Texture2D. (this works OK).
  3. lock the interop texture
  4. try to bind to my FBO (this is the step that fails).
  5. render
  6. unlock
  7. use the d3d surface with WPF.

I’m running this on Windows XP. Is it possible that this will only work with WDDM drivers and Windows 7?


The purpose is to allow integration of openGL graphics with WPF.

If you want to integrate OpenGL and WPF, there are easier ways to do it. There are techniques for creating a Win32 HWND within a WPF-controlled system. Once you’ve got that working, just use the HWND to create an OpenGL context and use it as normal.

That’s true, but it will not allow complete integration. Rendering to the window will create “air-space” problems, where native WPF controls can’t be placed over the OpenGL window.

That’s true, but it will not allow complete integration.

No, but:

1: It’ll be more likely to work. The OpenGL implementation has the right to refuse textures for FBOs for any reason. And if NVIDIA’s implementation doesn’t want to allow DX interop textures in FBOs, there’s not much you can do about it.

2: It’ll be more likely to work outside of NVIDIA’s hardware. It is an NVIDIA extension, after all.

Also, how are you creating an OpenGL context if you don’t have a window?

You never answered my question about the texture’s format. That wasn’t idle or rhetorical.

And have you tried creating a renderbuffer instead of a texture?

Also, you may want to look at the issues section of the extension spec. Particularly Issue 4.

Hi yehiyam,

I am having the same problem: something happened during texture attachment (dx render targets -> FBO) :


because after it, i checked the FBO status using glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) and the result was always GL_FRAMEBUFFER_UNSUPPORTED_EXT!

did you find any solution??