benjcooley's picture

Add support for WPF interop for NVidia drivers using new WGL_NV_DX_interop

Project:The Open Toolkit library
Version:all versions
Component:Code
Category:feature request
Priority:critical
Assigned:Unassigned
Status:closed (invalid)
Description

It should now be possible to provide proper WPF interop with openGL (at least for NVidia cards) using the recently published WGL_NV_DX_interop extensions.

This is currently available in SlimDX for directX using shared DX9 textures with DX10 and DX11 with the WPF D3DImage class.

The same technique may now be used to share a DX9 render target with WPF and OpenGL using the WGL_NV_DX_interop extensions, eliminating the need to use WindowsFormsHost controls and completely eliminating the annoying airspace issues with current OpenGL WPF interop techniques.

The information on the WGL_NV_DX_interop extensions is here: http://developer.download.nvidia.com/opengl/specs/WGL_NV_DX_interop.txt.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

#1

As a platform- and vendor-specific technology, this does not belong into the core library. However, I would gladly help anyone wishing to implement this as an add-on, similar to GLWidget.

benjcooley's picture

#2

Sounds good.

I'm ultimately going to get around to implementing this for my project. When I do, I'll contribute it back.

yehiyam's picture

#3

Hi
Has anyone tried this extension?
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?

Thanks
Yehiyam

fc.opentk's picture

#4

Hi,

I'm tried the extension but i had no success. My main problem is when i try to write to the buffer using opengl.. nothing happens!

I did not have any problem during the initialization.. but during the render nothing happens..

thanks!

yehiyam's picture

#5

I got it to work.
If anyone is interested I could share my solution after I get a chance to clean it up a little.

fc.opentk's picture

#6

Priority:normal» critical

I am very interested to see what you did to make it work .. I wonder what I'm doing wrong ( using this extension) on my solution

thanks!

the Fiddler's picture

#8

Status:open» closed (invalid)

OpenTK itself cannot take a build-time dependency on platform- or vendor-specific technologies, such as WPF or WGL_NV_DX_interop.

Starting with OpenTK 1.1 beta4, it is now possible to use OpenTK with an OpenGL context created from a third-party library. I would suggest implementing this WPF+WGL_NV_DX_interop in a self-contained dll file and advertising that functionality in opentk.com instead.