Skip to content

Commit

Permalink
If glvnd library found, do not use libGL.so in epoxy_load_gl
Browse files Browse the repository at this point in the history
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 <[email protected]>

Signed-off-by: Emmanuele Bassi <[email protected]>
  • Loading branch information
ya-isakov authored and ebassi committed Jan 20, 2021
1 parent c797320 commit dbfa4b2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/dispatch_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit dbfa4b2

Please sign in to comment.