From 33659b8167e97aac60d7c90fa2eea11b931d5bdd Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 9 Nov 2023 12:41:50 +0100 Subject: [PATCH] Update to load "libGL.so" instead of "libGL.so.1" https://github.com/ocornut/imgui/issues/6983 --- template/gl3w.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/template/gl3w.h b/template/gl3w.h index cba3806..e2be5b5 100644 --- a/template/gl3w.h +++ b/template/gl3w.h @@ -18,7 +18,7 @@ // WILL NOT BE USING OUR LOADER, AND INSTEAD EXPECT ANOTHER/YOUR LOADER TO BE AVAILABLE IN THE COMPILATION UNIT. // // Regenerate with: -// python gl3w_gen.py --output ../imgui/backends/imgui_impl_opengl3_loader.h --ref ../imgui/backends/imgui_impl_opengl3.cpp ./extra_symbols.txt +// python3 gl3w_gen.py --output ../imgui/backends/imgui_impl_opengl3_loader.h --ref ../imgui/backends/imgui_impl_opengl3.cpp ./extra_symbols.txt // // More info: // https://github.com/dearimgui/gl3w_stripped @@ -189,7 +189,8 @@ static GL3WglProc (*glx_get_proc_address)(const GLubyte *); static int open_libgl(void) { - libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_LOCAL); + // 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) return GL3W_ERROR_LIBRARY_OPEN; *(void **)(&glx_get_proc_address) = dlsym(libgl, "glXGetProcAddressARB");