mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Add support for GLVND split libGLX/libOpenGL libraries. Closes #1069
This commit is contained in:
@@ -673,6 +673,7 @@ void GLXHook::RegisterHooks()
|
||||
// register library hooks
|
||||
LibraryHooks::RegisterLibraryHook("libGL.so", &GLXHooked);
|
||||
LibraryHooks::RegisterLibraryHook("libGL.so.1", &GLXHooked);
|
||||
LibraryHooks::RegisterLibraryHook("libGLX.so.0", &GLXHooked);
|
||||
|
||||
// register EGL hooks
|
||||
#define GLX_REGISTER(func) \
|
||||
|
||||
@@ -42,6 +42,9 @@ void *GetGLHandle()
|
||||
if(!handle)
|
||||
handle = Process::LoadModule("libGL.so");
|
||||
|
||||
if(!handle)
|
||||
handle = Process::LoadModule("libGLX.so.0");
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
@@ -279,6 +282,14 @@ class GLXPlatform : public GLPlatform
|
||||
if(!ret)
|
||||
ret = Process::GetFunctionAddress(GetGLHandle(), funcname);
|
||||
|
||||
if(!ret)
|
||||
{
|
||||
// last ditch attempt, try the libOpenGL version
|
||||
static void *OpenGLhandle = Process::LoadModule("libOpenGL.so.0");
|
||||
if(OpenGLhandle)
|
||||
ret = Process::GetFunctionAddress(OpenGLhandle, funcname);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user