From 2ee94d606cd8920d99c57d9ebfeb4d1f2aa14358 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 29 May 2014 17:09:26 +0200 Subject: [PATCH] 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 --- gst-libs/gst/gl/gstglcontext.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index ff172d8..b53e210 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -260,6 +260,10 @@ gst_gl_context_new (GstGLDisplay * display) user_choice = g_getenv ("GST_GL_PLATFORM"); 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 (!context && (!user_choice || g_strstr_len (user_choice, 7, "egl"))) 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"))) context = GST_GL_CONTEXT (gst_gl_context_cocoa_new ()); #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 (!context && (!user_choice || g_strstr_len (user_choice, 3, "wgl"))) { context = GST_GL_CONTEXT (gst_gl_context_wgl_new ()); -- 2.7.4