From bd2821982f8007dd9280f7582922b03654f74a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 11 Apr 2015 19:14:34 +0200 Subject: [PATCH] glcolorconvert: Add correct check for RG/R textures in glcolorconvert too https://bugzilla.gnome.org/show_bug.cgi?id=732507 --- gst-libs/gst/gl/gstglcolorconvert.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c index 95a0eb22ac..6def681224 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.c +++ b/gst-libs/gst/gl/gstglcolorconvert.c @@ -900,8 +900,10 @@ _YUV_to_RGB (GstGLColorConvert * convert) gboolean texture_rg = FALSE; #else gboolean texture_rg = - gst_gl_context_check_feature (convert->context, "GL_EXT_texture_rg") - || gst_gl_context_check_feature (convert->context, "GL_ARB_texture_rg"); + gst_gl_context_check_feature (context, "GL_EXT_texture_rg") + || gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0) + || gst_gl_context_check_feature (context, "GL_ARB_texture_rg") + || gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 0); #endif gboolean apple_ycbcr = gst_gl_context_check_feature (convert->context, "GL_APPLE_ycbcr_422"); @@ -1138,8 +1140,10 @@ _GRAY_to_RGB (GstGLColorConvert * convert) gboolean texture_rg = FALSE; #else gboolean texture_rg = - gst_gl_context_check_feature (convert->context, "GL_EXT_texture_rg") - || gst_gl_context_check_feature (convert->context, "GL_ARB_texture_rg"); + gst_gl_context_check_feature (context, "GL_EXT_texture_rg") + || gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0) + || gst_gl_context_check_feature (context, "GL_ARB_texture_rg") + || gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 0); #endif info->in_n_textures = 1;