mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-13 02:45:35 +00:00
glcontext: fail context creation if glGetString returns NULL
This commit is contained in:
parent
64dd17bde6
commit
e2f61d20a2
1 changed files with 6 additions and 0 deletions
|
@ -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 *)
|
||||
|
|
Loading…
Reference in a new issue