Skip to content

Commit e4d989a

Browse files
committed
try more filenames for egl loading
1 parent 963d8a4 commit e4d989a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/render/opengl/gl_engine_egl.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,17 @@ void GLEngineEGL::resolveEGL() {
290290
std::cout << polyscope::options::printPrefix << "Attempting to dlopen libEGL.so" << std::endl;
291291
}
292292
void* handle = dlopen("libEGL.so", RTLD_LAZY);
293+
if (handle && options::verbosity > 5) {
294+
std::cout << polyscope::options::printPrefix << " ...loaded libEGL.so" << std::endl;
295+
}
293296
if (!handle) {
294-
error("EGL: Could not open libEGL.so.");
297+
handle = dlopen("libEGL.so.1", RTLD_LAZY); // try it while we're at it, happens on OSMesa without dev headers
295298
}
296-
if (options::verbosity > 5) {
297-
std::cout << polyscope::options::printPrefix << " ...loaded libEGL.so" << std::endl;
299+
if (handle && options::verbosity > 5) {
300+
std::cout << polyscope::options::printPrefix << " ...loaded libEGL.so.1" << std::endl;
301+
}
302+
if (!handle) {
303+
error("EGL: Could not open libEGL.so");
298304
}
299305

300306
// Get EGL functions

0 commit comments

Comments
 (0)