diff options
author | wm4 <wm4@nowhere> | 2015-11-10 11:50:09 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-10 11:51:11 +0100 |
commit | 9d9f863f55ecca1f4926d5334bd7fe33ebac81df (patch) | |
tree | 7aa05341af21f6e95e6d7c823ad4a5bee9ce0848 | |
parent | dd0c85679b22ff9ab2ceb682c162053036772991 (diff) |
vo_opengl: limit GLSL to version 3.3
Fixes custom shaders, which define their entrypoint as sample()
function.
-rw-r--r-- | video/out/opengl/common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c index da0a5143e7..54389e15cf 100644 --- a/video/out/opengl/common.c +++ b/video/out/opengl/common.c @@ -469,6 +469,8 @@ void mpgl_load_functions2(GL *gl, void *(*get_fn)(void *ctx, const char *n), int glsl_major = 0, glsl_minor = 0; if (sscanf(shader, "%d.%d", &glsl_major, &glsl_minor) == 2) gl->glsl_version = glsl_major * 100 + glsl_minor; + // GLSL 400 defines "sample" as keyword - breaks custom shaders. + gl->glsl_version = MPMIN(gl->glsl_version, 330); } if (is_software_gl(gl)) { |