diff options
author | wm4 <wm4@nowhere> | 2014-12-21 21:54:50 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-21 23:46:54 +0100 |
commit | d5a7ad630f27999355d0a6c25affd10bfabd1d43 (patch) | |
tree | 920706c5b8502fae4effdd8a5634c4f8577c518c /video/out/gl_common.c | |
parent | ec4bbbb69b83b781972ff4e81a8ea44d62b91c56 (diff) | |
download | mpv-d5a7ad630f27999355d0a6c25affd10bfabd1d43.tar.bz2 mpv-d5a7ad630f27999355d0a6c25affd10bfabd1d43.tar.xz |
vo_opengl: improve fallback handling with GLES
Whether we have texture_rg doesn't matter much anymore; the scaler
should be fine with this. But on ES 2.0, 1st class arrays are missing,
so even if filterable float textures should be available, it won't work.
Dithering (at least the "fruit" variant) will not work either, because
it uses floats.
Diffstat (limited to 'video/out/gl_common.c')
-rw-r--r-- | video/out/gl_common.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/video/out/gl_common.c b/video/out/gl_common.c index 05bce4dfb5..a94ad1fc75 100644 --- a/video/out/gl_common.c +++ b/video/out/gl_common.c @@ -105,6 +105,8 @@ static const struct feature features[] = { {MPGL_CAP_SRGB_FB, "sRGB framebuffers"}, {MPGL_CAP_FLOAT_TEX, "Float textures"}, {MPGL_CAP_TEX_RG, "RG textures"}, + {MPGL_CAP_1ST_CLASS_ARRAYS, "1st class shader arrays"}, + {MPGL_CAP_3D_TEX, "3D textures"}, {MPGL_CAP_SW, "suspected software renderer"}, {0}, }; @@ -241,9 +243,10 @@ static const struct gl_functions gl_functions[] = { {0}, }, }, - // GL 2.1+ desktop only + // GL 2.1+ desktop only, GLSL 120 { .ver_core = 210, + .provides = MPGL_CAP_3D_TEX | MPGL_CAP_1ST_CLASS_ARRAYS, .functions = (const struct gl_function[]) { DEF_FN(MapBuffer), DEF_FN(TexImage3D), @@ -255,7 +258,8 @@ static const struct gl_functions gl_functions[] = { { .ver_core = 300, .ver_es_core = 300, - .provides = MPGL_CAP_SRGB_TEX | MPGL_CAP_SRGB_FB | MPGL_CAP_VAO, + .provides = MPGL_CAP_SRGB_TEX | MPGL_CAP_SRGB_FB | MPGL_CAP_VAO | + MPGL_CAP_3D_TEX | MPGL_CAP_1ST_CLASS_ARRAYS, .functions = (const struct gl_function[]) { DEF_FN(BindVertexArray), DEF_FN(DeleteVertexArrays), @@ -388,7 +392,7 @@ static const struct gl_functions gl_functions[] = { // But the previous code didn't do that, and nobody ever complained. { .ver_removed = 210, - .ver_es_removed = 300, + .ver_es_removed = 100, .partial_ok = true, .functions = (const struct gl_function[]) { DEF_FN_NAMES(GenBuffers, "glGenBuffers", "glGenBuffersARB"), |