summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-31 21:04:29 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:16 +0900
commitc473688c5f4177295d7e6f8c67148ded70b77e2e (patch)
treece9f6b7afd6cc943e06f76532abd3750aa986fb3
parent413bd225273b64c9086405d778c5eae2fa356934 (diff)
downloadmpv-c473688c5f4177295d7e6f8c67148ded70b77e2e.tar.bz2
mpv-c473688c5f4177295d7e6f8c67148ded70b77e2e.tar.xz
gl_hwdec_vda: refuse to work with old OpenGL versions
The way we use rectangle textures (required by VDA for no reason) works onl in OpenGL 3.0 or higher. Below that, the shader will fail to compile. We could add support for older OpenGL versions, but that would be a major pain. This normally doesn't matter; mpv itself always creates OpenGL 3.2 contexts on OSX. But it could matter if a client API user uses vo_opengl_cb, and gives it a 2.1 context (which OSX also allows you to create). Conflicts: video/out/gl_hwdec_vda.c
-rw-r--r--video/out/gl_hwdec_vda.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/gl_hwdec_vda.c b/video/out/gl_hwdec_vda.c
index c86c1abb34..47bdb3ebfa 100644
--- a/video/out/gl_hwdec_vda.c
+++ b/video/out/gl_hwdec_vda.c
@@ -40,6 +40,11 @@ static bool check_hwdec(struct gl_hwdec *hw)
return false;
}
+ if (hw->mpgl->gl->version < 300) {
+ MP_ERR(hw, "need >= OpenGL 3.0 for core rectangle texture support\n");
+ return false;
+ }
+
if (!vo->cocoa) {
MP_ERR(hw, "need cocoa opengl backend to be active");
return false;