summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/egl_helpers.c
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2017-02-04 19:16:02 +1100
committerJames Ross-Gowan <rossymiles@gmail.com>2017-02-07 22:45:07 +1100
commite0250b9604b24f32d53b409d8c48d16faa2caebc (patch)
tree2cc257cbc78b4d949feace4356d487869de20e3d /video/out/opengl/egl_helpers.c
parent5fbad204a6d059a1ee997567d0ff470384736820 (diff)
downloadmpv-e0250b9604b24f32d53b409d8c48d16faa2caebc.tar.bz2
mpv-e0250b9604b24f32d53b409d8c48d16faa2caebc.tar.xz
vo_opengl: angle: rewrite with custom swap chain
This replaces the old backend that exclusively used EGL windowing with one that can also use ANGLE's ability to render to directly to a texture. The advantage of this is that it allows mpv to create the swap chain itself and this allows mpv to use a flip-mode swap chain on a HWND (which avoids problems with DirectComposition) and to use a longer swap chain that has six backbuffers by default (which reportedly fixes problems with rendering 24fps video on 24Hz monitors.) Also, "screenshot window" should now work on DXGI 1.2 and up (Windows 8 and up.)
Diffstat (limited to 'video/out/opengl/egl_helpers.c')
-rw-r--r--video/out/opengl/egl_helpers.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/opengl/egl_helpers.c b/video/out/opengl/egl_helpers.c
index 7f01d93307..465d945ce8 100644
--- a/video/out/opengl/egl_helpers.c
+++ b/video/out/opengl/egl_helpers.c
@@ -21,6 +21,12 @@
#include "common.h"
#include "context.h"
+#ifdef HAVE_EGL_ANGLE
+// On Windows, egl_helpers.c is only used by ANGLE, where the EGL functions may
+// be loaded dynamically from ANGLE DLLs
+#include "angle_dynamic.h"
+#endif
+
// EGL 1.5
#ifndef EGL_CONTEXT_OPENGL_PROFILE_MASK
#define EGL_CONTEXT_MAJOR_VERSION 0x3098