path: root/wscript
diff options
authorJames Ross-Gowan <>2015-12-01 00:56:02 +1100
committerMartin Herkt <>2015-12-11 18:29:18 +0100
commit3d12312806e7d54e7bb6b4b2a5981999735f6233 (patch)
tree8aa8908b1727a314860bfeb6a3752272e3bbc4b4 /wscript
parenta6521f394122ee1ce097ceba5d0fc18ad4fd7e7a (diff)
vo_opengl: add dxinterop backend
WGL_NV_DX_interop is widely supported by Nvidia and AMD drivers. It allows a texture to be shared between Direct3D and WGL, so that rendering can be done with WGL and presentation can be done with Direct3D. This should allow us to work around some persistent WGL issues, such as dropped frames with some driver/OS combos, drivers that buffer frames to increase performance at the cost of latency, and the inability to disable exclusive fullscreen mode when using WGL to render to a fullscreen window. The addition of a DX_interop backend might also enable some cool Direct3D-specific enhancements in the future, such as using the GetPresentStatistics API to get accurate frame presentation timestamps. Note that due to a driver bug, this backend is currently broken on Intel. It will appear to work as long as the window is not resized too often, but after a few changes of size it will be unable to share the newly created renderbuffer with GL. See:
Diffstat (limited to 'wscript')
1 files changed, 8 insertions, 0 deletions
diff --git a/wscript b/wscript
index afc0540fee..a5e6914133 100644
--- a/wscript
+++ b/wscript
@@ -663,6 +663,14 @@ video_output_features = [
'func': check_statement('windows.h', 'wglCreateContext(0)',
} , {
+ 'name': '--gl-dxinterop',
+ 'desc': 'OpenGL/DirectX Interop Backend',
+ 'deps': [ 'gl-win32' ],
+ 'groups': [ 'gl' ],
+ 'func': compose_checks(
+ check_statement(['GL/gl.h', 'GL/wglext.h'], 'int i = WGL_ACCESS_WRITE_DISCARD_NV'),
+ check_statement('d3d9.h', 'IDirect3D9Ex *d'))
+ } , {
'name': '--egl-angle',
'desc': 'OpenGL Win32 ANGLE Backend',
'deps_any': [ 'os-win32', 'os-cygwin' ],