glcontext: Try GLX support before EGL support
If available, glx has got a better chance of being the Gl platform we want to use compared to EGL
This commit is contained in:
parent
14f844e1e9
commit
2ee94d606c
@ -260,6 +260,10 @@ gst_gl_context_new (GstGLDisplay * display)
|
|||||||
|
|
||||||
user_choice = g_getenv ("GST_GL_PLATFORM");
|
user_choice = g_getenv ("GST_GL_PLATFORM");
|
||||||
GST_INFO ("creating a context, user choice:%s", user_choice);
|
GST_INFO ("creating a context, user choice:%s", user_choice);
|
||||||
|
#if GST_GL_HAVE_PLATFORM_GLX
|
||||||
|
if (!context && (!user_choice || g_strstr_len (user_choice, 3, "glx")))
|
||||||
|
context = GST_GL_CONTEXT (gst_gl_context_glx_new ());
|
||||||
|
#endif
|
||||||
#if GST_GL_HAVE_PLATFORM_EGL
|
#if GST_GL_HAVE_PLATFORM_EGL
|
||||||
if (!context && (!user_choice || g_strstr_len (user_choice, 7, "egl")))
|
if (!context && (!user_choice || g_strstr_len (user_choice, 7, "egl")))
|
||||||
context = GST_GL_CONTEXT (gst_gl_context_egl_new ());
|
context = GST_GL_CONTEXT (gst_gl_context_egl_new ());
|
||||||
@ -268,10 +272,6 @@ gst_gl_context_new (GstGLDisplay * display)
|
|||||||
if (!context && (!user_choice || g_strstr_len (user_choice, 5, "cgl")))
|
if (!context && (!user_choice || g_strstr_len (user_choice, 5, "cgl")))
|
||||||
context = GST_GL_CONTEXT (gst_gl_context_cocoa_new ());
|
context = GST_GL_CONTEXT (gst_gl_context_cocoa_new ());
|
||||||
#endif
|
#endif
|
||||||
#if GST_GL_HAVE_PLATFORM_GLX
|
|
||||||
if (!context && (!user_choice || g_strstr_len (user_choice, 3, "glx")))
|
|
||||||
context = GST_GL_CONTEXT (gst_gl_context_glx_new ());
|
|
||||||
#endif
|
|
||||||
#if GST_GL_HAVE_PLATFORM_WGL
|
#if GST_GL_HAVE_PLATFORM_WGL
|
||||||
if (!context && (!user_choice || g_strstr_len (user_choice, 3, "wgl"))) {
|
if (!context && (!user_choice || g_strstr_len (user_choice, 3, "wgl"))) {
|
||||||
context = GST_GL_CONTEXT (gst_gl_context_wgl_new ());
|
context = GST_GL_CONTEXT (gst_gl_context_wgl_new ());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user