| 1 | Description: set __GLVND_DISALLOW_PATCHING=1 before loading glvnd libraries |
| 2 | Author: Andreas Beckmann <[email protected]> |
| 3 | |
| 4 | --- a/libglfork.cpp |
| 5 | +++ b/libglfork.cpp |
| 6 | @@ -165,6 +165,9 @@ struct ContextsInfo: public std::map<GLX |
| 7 | struct EarlyInitializer { |
| 8 | EarlyInitializer(const char **adpy_strp, const char **libgla_strp) |
| 9 | { |
| 10 | + // Allow multiple glvnd libGL.so.1 instances to be loaded into a process |
| 11 | + // and OpenGL calls dispatched to them depending on context. |
| 12 | + setenv("__GLVND_DISALLOW_PATCHING", "1", 0); |
| 13 | #ifdef BUMBLEBEE_SOCKET |
| 14 | // Signal the Bumblebee daemon to bring up secondary X |
| 15 | int sock = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); |