glcontext: fail context creation if glGetString returns NULL

This commit is contained in:
Matthew Waters 2014-11-06 18:37:23 +11:00 committed by Tim-Philipp Müller
parent 64dd17bde6
commit e2f61d20a2

View file

@ -1063,6 +1063,12 @@ _create_context_info (GstGLContext * context, GstGLAPI gl_api, gint * gl_major,
gl = context->gl_vtable;
if (!gl->GetString || !gl->GetString (GL_VERSION)) {
g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
"glGetString not defined or returned invalid value");
return FALSE;
}
GST_INFO ("GL_VERSION: %s",
GST_STR_NULL ((const gchar *) gl->GetString (GL_VERSION)));
GST_INFO ("GL_SHADING_LANGUAGE_VERSION: %s", GST_STR_NULL ((const gchar *)