[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,9 @@
#include "../../../Includes.h"
MOBILEGL_GLX_API void* glXGetProcAddress(const char* name) {
return MG_Impl::GLXImpl::GetProcAddress(name);
}
MOBILEGL_GLX_API void* glXGetProcAddressARB(const char* name) {
return MG_Impl::GLXImpl::GetProcAddressARB(name);
}
@@ -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);
}
}
+8
View File
@@ -0,0 +1,8 @@
#pragma once
namespace MG_Impl {
namespace GLXImpl {
void* GetProcAddress(const char* name);
void* GetProcAddressARB(const char* name);
}
}