Skip to content

Commit

Permalink
Update to load "libGL.so" variants.
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Jan 9, 2024
1 parent 58bcb0d commit ab15278
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions template/gl3w.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ static int open_libgl(void)
{
// While most systems use libGL.so.1, NetBSD seems to use that libGL.so.3. See https://github.com/ocornut/imgui/issues/6983
libgl = dlopen("libGL.so", RTLD_LAZY | RTLD_LOCAL);
if (!libgl)
libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_LOCAL);
if (!libgl)
libgl = dlopen("libGL.so.3", RTLD_LAZY | RTLD_LOCAL);
if (!libgl)
return GL3W_ERROR_LIBRARY_OPEN;
*(void **)(&glx_get_proc_address) = dlsym(libgl, "glXGetProcAddressARB");
Expand Down

0 comments on commit ab15278

Please sign in to comment.