mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
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:
parent
3edb758d5d
commit
c8628fc43d
1 changed files with 7 additions and 2 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue