gl: fix detection of extensions with GL versions < 3

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
This commit is contained in:
Matthew Waters 2014-04-01 21:48:26 +11:00 committed by Tim-Philipp Müller
parent 82555e80ba
commit 790f34c7a6

View 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) {