From e0250b9604b24f32d53b409d8c48d16faa2caebc Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Sat, 4 Feb 2017 19:16:02 +1100 Subject: 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.) --- video/out/opengl/angle_dynamic.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'video/out/opengl/angle_dynamic.h') diff --git a/video/out/opengl/angle_dynamic.h b/video/out/opengl/angle_dynamic.h index 87ad85c268..12a0c692eb 100644 --- a/video/out/opengl/angle_dynamic.h +++ b/video/out/opengl/angle_dynamic.h @@ -45,9 +45,12 @@ (EGLDisplay, EGLint)) \ FN(eglSwapBuffers, EGLBoolean (*EGLAPIENTRY PFN_eglSwapBuffers) \ (EGLDisplay, EGLSurface)) \ + FN(eglSwapInterval, EGLBoolean (*EGLAPIENTRY PFN_eglSwapInterval) \ + (EGLDisplay, EGLint)) \ FN(eglReleaseTexImage, EGLBoolean (*EGLAPIENTRY PFN_eglReleaseTexImage) \ (EGLDisplay, EGLSurface, EGLint)) \ - FN(eglTerminate, EGLBoolean (*EGLAPIENTRY PFN_eglTerminate)(EGLDisplay)) + FN(eglTerminate, EGLBoolean (*EGLAPIENTRY PFN_eglTerminate)(EGLDisplay)) \ + FN(eglWaitClient, EGLBoolean (*EGLAPIENTRY PFN_eglWaitClient)(void)) #define ANGLE_EXT_DECL(NAME, VAR) \ extern VAR; @@ -76,7 +79,9 @@ bool angle_load(void); #define eglQueryString PFN_eglQueryString #define eglReleaseTexImage PFN_eglReleaseTexImage #define eglSwapBuffers PFN_eglSwapBuffers +#define eglSwapInterval PFN_eglSwapInterval #define eglTerminate PFN_eglTerminate +#define eglWaitClient PFN_eglWaitClient #endif #endif -- cgit v1.2.3