diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-12-01 14:45:41 +0300 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-12-01 14:45:41 +0300 |
commit | ff4057b6a1c83af831ad36db2a517ccca3fc5381 (patch) | |
tree | f0b685cdee4f89474b3b234edadd2eb0f74ac488 /overlay_gl | |
parent | 14ff24fd411a344ed06565114b07bbb4ac4ae5c0 (diff) |
Try to promote libGL.so to global scope if we can't resolve it directly
Diffstat (limited to 'overlay_gl')
-rw-r--r-- | overlay_gl/overlay.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/overlay_gl/overlay.c b/overlay_gl/overlay.c index 31c3c7ce5..c9506798b 100644 --- a/overlay_gl/overlay.c +++ b/overlay_gl/overlay.c @@ -107,6 +107,16 @@ FDEF(glXGetProcAddress); static void resolveOpenGL() { RESOLVE(glXSwapBuffers); + + if (! oglXSwapBuffers) { + void *lib = dlopen("libGL.so.1", RTLD_GLOBAL | RTLD_NOLOAD); + if (! lib) + return; + RESOLVE(glXSwapBuffers); + if (! oglXSwapBuffers) + dlclose(lib); + } + RESOLVE(glXGetProcAddressARB); RESOLVE(glXGetProcAddress); } |