summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2010-08-05 13:54:41 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2010-08-18 16:39:11 +0100
commitbb06b6282fe6bf9b04f1d8533591273c0d4629ae (patch)
tree41891a71833ba7842cd40c9d6ae50457f183853b
parent8e5f6de3b480ab845233c84bb95057940690da8b (diff)
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.
-rw-r--r--clutter-gst/clutter-gst-video-sink.c8
1 files 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))