summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/common.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-04-27 19:14:10 +0200
committerwm4 <wm4@nowhere>2016-04-27 19:19:56 +0200
commit9d16837c99c91e786e517b2520afa79bcdc433b3 (patch)
treed21daf07515b941fb447fa3ad734395f4b83946f /video/out/opengl/common.c
parent757c8baf8c5bd4598cd5455908e4fa543821837a (diff)
downloadmpv-9d16837c99c91e786e517b2520afa79bcdc433b3.tar.bz2
mpv-9d16837c99c91e786e517b2520afa79bcdc433b3.tar.xz
vo_opengl: support GL_EXT_texture_norm16 on GLES
This gives us 16 bit fixed-point integer texture formats, including ability to sample from them with linear filtering, and using them as FBO attachments. The integer texture format path is still there for the sake of ANGLE, which does not support GL_EXT_texture_norm16 yet. The change to pass_dither() is needed, because the code path using GL_R16 for the dither texture relies on glTexImage2D being able to convert from GL_FLOAT to GL_R16. GLES does not allow this. This could be trivially fixed by doing the conversion ourselves, but I'm too lazy to do this now.
Diffstat (limited to 'video/out/opengl/common.c')
-rw-r--r--video/out/opengl/common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c
index 30cce911e4..f9c830f25a 100644
--- a/video/out/opengl/common.c
+++ b/video/out/opengl/common.c
@@ -226,6 +226,12 @@ static const struct gl_functions gl_functions[] = {
.extension = "GL_ARB_texture_rg",
.provides = MPGL_CAP_TEX_RG,
},
+ // GL_R16 etc.
+ {
+ .ver_core = 300,
+ .extension = "GL_EXT_texture_norm16",
+ .provides = MPGL_CAP_EXT16,
+ },
{
.ver_core = 320,
.extension = "GL_ARB_sync",