[Feat] (MG_Impl/GLX): Implement glXGetProcAddress.

This commit is contained in:
BZLZHH
2025-07-11 18:47:42 +08:00
parent 62e141000e
commit 3078667e1d
5 changed files with 54 additions and 2 deletions
@@ -0,0 +1,19 @@
#include "../../../Includes.h"
namespace MG_Impl::GLXImpl {
void* GetProcAddress(const char* name) {
MGLOG_D("glXGetProcAddress(\"%s\")", name);
void* proc = dlsym(RTLD_DEFAULT, (const char*)name);
if (!proc) {
MGLOG_W("Failed to get function: %s", (const char*)name);
return nullptr;
}
return proc;
}
void* GetProcAddressARB(const char* name) {
return GetProcAddress(name);
}
}