mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 13:48:30 +09:00
[Feat] (MG_Impl/GLX): Implement glXGetProcAddress.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user