summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-31 21:04:29 +0100
committerwm4 <wm4@nowhere>2014-12-31 21:04:52 +0100
commit3e12e79b8f433f47aa4b7d9bec624012149d2e47 (patch)
tree723f6e8a911a19d2b1ae8fd93755f0f82d1014fb /video/out
parent84fe12fab557a066cfa1d8770eef81330816435e (diff)
downloadmpv-3e12e79b8f433f47aa4b7d9bec624012149d2e47.tar.bz2
mpv-3e12e79b8f433f47aa4b7d9bec624012149d2e47.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).
Diffstat (limited to 'video/out')
-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 50ff2db437..4264dff975 100644
--- a/video/out/gl_hwdec_vda.c
+++ b/video/out/gl_hwdec_vda.c
@@ -37,6 +37,11 @@ static bool check_hwdec(struct gl_hwdec *hw)
return false;
}
+ if (hw->gl->version < 300) {
+ MP_ERR(hw, "need >= OpenGL 3.0 for core rectangle texture support\n");
+ return false;
+ }
+
if (!CGLGetCurrentContext()) {
MP_ERR(hw, "need cocoa opengl backend to be active");
return false;