Update OpenGLWindow.cpp
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 1m25s
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user