vo_opengl: support 3D textures on ANGLE

Unfortunately, color management can still not work, because no GLES
version specified so far support fixed-point 16 bit textures. Maybe
we could use integer textures, but these don't support filtering.
Using float textures would be another possibility.
This commit is contained in:
wm4 2015-11-19 21:21:04 +01:00
parent 6df3fa2ec1
commit 4fd0cd4a73
2 changed files with 13 additions and 3 deletions

View File

@ -154,14 +154,13 @@ static const struct gl_functions gl_functions[] = {
// GL 2.1+ desktop only (and GLSL 120 shaders)
{
.ver_core = 210,
.provides = MPGL_CAP_ROW_LENGTH | MPGL_CAP_1D_TEX | MPGL_CAP_3D_TEX,
.provides = MPGL_CAP_ROW_LENGTH | MPGL_CAP_1D_TEX,
.functions = (const struct gl_function[]) {
DEF_FN(DrawBuffer),
DEF_FN(GetTexLevelParameteriv),
DEF_FN(MapBuffer),
DEF_FN(ReadBuffer),
DEF_FN(TexImage1D),
DEF_FN(TexImage3D),
DEF_FN(UnmapBuffer),
{0}
},
@ -188,6 +187,15 @@ static const struct gl_functions gl_functions[] = {
{0}
},
},
{
.ver_core = 210,
.ver_es_core = 300,
.provides = MPGL_CAP_3D_TEX,
.functions = (const struct gl_function[]) {
DEF_FN(TexImage3D),
{0}
},
},
// Useful for ES 2.0
{
.ver_core = 110,

View File

@ -644,8 +644,10 @@ void gl_video_set_lut3d(struct gl_video *p, struct lut3d *lut3d)
return;
}
if (!(gl->mpgl_caps & MPGL_CAP_3D_TEX))
if (!(gl->mpgl_caps & MPGL_CAP_3D_TEX) || gl->es) {
MP_ERR(p, "16 bit fixed point 3D textures not available.\n");
return;
}
if (!p->lut_3d_texture)
gl->GenTextures(1, &p->lut_3d_texture);