From bb06b6282fe6bf9b04f1d8533591273c0d4629ae Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Thu, 5 Aug 2010 13:54:41 +0100 Subject: sink: Use cogl_features_available to check for ARBfp Instead of using glGetString to manually check the OpenGL extension string we now query Cogl for the COGL_FEATURE_SHADERS_ARBFP feature flag. --- clutter-gst/clutter-gst-video-sink.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c index 0bd9280..4839c54 100644 --- a/clutter-gst/clutter-gst-video-sink.c +++ b/clutter-gst/clutter-gst-video-sink.c @@ -824,7 +824,6 @@ static GSList * clutter_gst_build_renderers_list (void) { GSList *list = NULL; - const gchar *gl_extensions; GLint nb_texture_units = 0; gint features = 0, i; /* The order of the list of renderers is important. They will be prepended @@ -845,17 +844,14 @@ clutter_gst_build_renderers_list (void) NULL }; - /* get the features */ - gl_extensions = (const gchar*) glGetString (GL_EXTENSIONS); - glGetIntegerv (GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &nb_texture_units); if (nb_texture_units >= 3) features |= CLUTTER_GST_MULTI_TEXTURE; #ifdef CLUTTER_COGL_HAS_GL - if (strstr (gl_extensions, "GL_ARB_fragment_program") != NULL) - features |= CLUTTER_GST_FP; + if (cogl_features_available (COGL_FEATURE_SHADERS_ARBFP)) + features |= CLUTTER_GST_FP; #endif if (cogl_features_available (COGL_FEATURE_SHADERS_GLSL)) -- cgit v1.2.3