summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav Isakov <yaroslav.isakov@gmail.com>2020-07-29 16:40:01 +0200
committerEmmanuele Bassi <ebassi@gnome.org>2021-01-20 12:18:57 +0000
commitdbfa4b209c0712b67dfeb8366c2ebe8503063b52 (patch)
tree7b49794d06086fe20a93e0d84b90b9b065b792b6
parentc7973204247c777086a94f9f99af83c1a51b2d8e (diff)
downloadlibepoxy-dbfa4b209c0712b67dfeb8366c2ebe8503063b52.tar.gz
If glvnd library found, do not use libGL.so in epoxy_load_gl
Without additional check, even if libOpenGL was loaded, libGL.so will be loaded as well, and used both in gl_handle and glx_handle, so libglvnd libraries will not be used. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
-rw-r--r--src/dispatch_common.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/dispatch_common.c b/src/dispatch_common.c
index 9977a02..cfc9dcc 100644
--- a/src/dispatch_common.c
+++ b/src/dispatch_common.c
@@ -674,9 +674,12 @@ epoxy_load_gl(void)
if (!api.gl_handle)
get_dlopen_handle(&api.gl_handle, OPENGL_LIB, false, true);
#endif
-
- get_dlopen_handle(&api.glx_handle, GLX_LIB, true, true);
- api.gl_handle = api.glx_handle;
+ if (!api.gl_handle) {
+ get_dlopen_handle(&api.gl_handle, GLX_LIB, true, true);
+#if PLATFORM_HAS_GLX
+ api.glx_handle = api.gl_handle;
+#endif
+ }
#endif
}