From 05b3a8cd1413c3903e4713ad7748739d39ac7781 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 19 May 2016 17:52:09 +0200 Subject: vo_opengl: require at least ES 3.0 for float textures ES 2.0 has this weird rule that not the internalformat parameter determines the internal format, but the combination of all texture parameters. GL_OES_texture_half_float thus does not specify e.g. a GL_RGBA16F format, but requires passing GL_RGBA as format and GL_HALF_FLOAT_OES as type. We won't bother with this, since ES 2.0 is a lost cause anyway. This also removes the OpenGL error when the code is trying to create a f16 FBO for testing whether FBOs work. --- video/out/opengl/formats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video') diff --git a/video/out/opengl/formats.c b/video/out/opengl/formats.c index b56da5ddc2..3ca6fe7b8e 100644 --- a/video/out/opengl/formats.c +++ b/video/out/opengl/formats.c @@ -115,7 +115,7 @@ int gl_format_feature_flags(GL *gl) | (gl->es >= 300 ? F_ES3 : 0) | (gl->es >= 320 ? F_ES32 : 0) | (gl->mpgl_caps & MPGL_CAP_EXT16 ? F_EXT16 : 0) - | ((gl->es && + | ((gl->es >= 300 && (gl->mpgl_caps & MPGL_CAP_TEX_RG) && (gl->mpgl_caps & MPGL_CAP_EXT_CR_HFLOAT) && (gl->mpgl_caps & MPGL_CAP_OES_HFLOAT_LIN)) ? F_EXTF16 : 0) -- cgit v1.2.3