Skip to content
Snippets Groups Projects
Commit ea266ab1 authored by Yann Lochet's avatar Yann Lochet Committed by Jean-Baptiste Kempf
Browse files

filters: fallback to OpenGL 2 if OpenGL 3 is not available for EGL

parent 96caf7e8
No related branches found
No related tags found
Loading
Pipeline #287652 passed with stage
in 11 minutes and 11 seconds
......@@ -221,11 +221,31 @@ static int InitEGL(vlc_gl_t *gl, unsigned width, unsigned height)
= sys->context
= eglCreateContext(sys->display, cfgv[0], EGL_NO_CONTEXT, ctx_attr);
#ifdef USE_OPENGL_ES2
if (ctx == EGL_NO_CONTEXT)
{
msg_Err (gl, "cannot create EGL context");
goto error;
}
#else
if (ctx == EGL_NO_CONTEXT)
{
const GLint ctx_attr_fallback[] = {
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE
};
ctx
= sys->context
= eglCreateContext(sys->display, cfgv[0], EGL_NO_CONTEXT, ctx_attr_fallback);
if (ctx == EGL_NO_CONTEXT)
{
msg_Err (gl, "cannot create EGL context");
goto error;
}
}
#endif
return VLC_SUCCESS;
error:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment