Update OpenGLWindow.cpp
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 1m25s

Fixed a case where on some distros the OpenGL shared object is called something different.
This commit is contained in:
2025-01-31 00:30:39 -05:00
parent 778166c23f
commit 0ba3618b3c

View File

@@ -170,9 +170,22 @@ OpenGLWindow::OpenGLWindow(const std::string& title, int width, int height, uint
if (!glx_lib)
glx_lib = dlopen("libGLX.so", RTLD_LAZY);
if (!glx_lib)
glx_lib = dlopen("libGLX.so.0", RTLD_LAZY);
if (!opengl_lib)
opengl_lib = dlopen("libGL.so", RTLD_LAZY);
if (!opengl_lib)
opengl_lib = dlopen("libOpenGL.so", RTLD_LAZY);
if (!opengl_lib)
opengl_lib = dlopen("libOpenGL.so.0", RTLD_LAZY);
if (!opengl_lib)
opengl_lib = dlopen("libOpenGL.so.0.0.0", RTLD_LAZY);
if (!opengl_lib)
Logger::Error("libOpenGL.so couldn't be found in your LD_LIBRARY_PATH."),
OpenGL::constructor_success = false;