luciusDXL / TheForceEngine

Modern "Jedi Engine" replacement supporting Dark Forces, mods, and in the future Outlaws.
https://TheForceEngine.github.io
GNU General Public License v2.0
946 stars 71 forks source link

Linux: default linkage to legacy OpenGL (libGL.so) library #410

Closed mlauss2 closed 2 weeks ago

mlauss2 commented 1 month ago

Modern CMake (and when I initially wrote the CMakeLists) prefers GLVND, which is a fancy way to dispatch OpenGL calls over multiple different client libraries. However that does not work with the ancient (<=340.xx) nvidia binary linux drivers, which still assume that there can be only one libGL.so on a linux system.

Even if the GLVND libraries are available on the target system, there will not be any GL output since the client library does not understand the GLVND dispatches, resulting in black screens.

Fix this by explicitly requesting CMake to prefer the legacy OpenGL linkage approach.

Fixes #395 and I suspect a few other crashes as well.

mlauss2 commented 2 weeks ago

I'm going to solve this differently, without build-time dynamic linking to libGL.