gl: fix detection of extensions with GL versions < 3
authorMatthew Waters <ystreet00@gmail.com>
Tue, 1 Apr 2014 10:48:26 +0000 (21:48 +1100)
committerMatthew Waters <ystreet00@gmail.com>
Tue, 1 Apr 2014 11:02:46 +0000 (22:02 +1100)
Mesa, for example returns valid pointers for glGetIntegerv and
glGetStringi even if the gl version is less than that required for
both those functions to supposedly exist.

https://bugzilla.gnome.org/show_bug.cgi?id=727324

gst-libs/gst/gl/gstglcontext.c

index 1b8a21c..10796fe 100644 (file)
@@ -801,7 +801,7 @@ gst_gl_context_create_thread (GstGLContext * context)
     goto failure;
 
   /* GL core contexts and GLES3 */
-  if (gl->GetIntegerv && gl->GetStringi)
+  if (gl->GetIntegerv && gl->GetStringi && gl_major >= 3)
     ext_g_str = _build_extension_string (context);
 
   if (ext_g_str && ext_g_str->len) {