glcontext: add specific error message when missing GL_SHADING_LANGUAGE_VERSION

GL_SHADING_LANGUAGE_VERSION was introduced since ES 2.0, but in some
android emulator doesn't support this feature. To prevent confusion for
developer, the error message need to be more clear.

https://bugzilla.gnome.org/show_bug.cgi?id=753905
This commit is contained in:
Justin Kim 2015-08-21 14:07:32 +09:00 committed by Tim-Philipp Müller
parent 3edb758d5d
commit c8628fc43d

View file

@ -1118,13 +1118,18 @@ _create_context_info (GstGLContext * context, GstGLAPI gl_api, gint * gl_major,
gl = context->gl_vtable;
if (!gl->GetString || !gl->GetString (GL_VERSION)
|| !gl->GetString (GL_SHADING_LANGUAGE_VERSION)) {
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;
}
if (!gl->GetString (GL_SHADING_LANGUAGE_VERSION)) {
g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
"No GL shader support available");
return FALSE;
}
GST_INFO_OBJECT (context, "GL_VERSION: %s",
GST_STR_NULL ((const gchar *) gl->GetString (GL_VERSION)));
GST_INFO_OBJECT (context, "GL_SHADING_LANGUAGE_VERSION: %s",