[Refactor] (...): Optimize code file structure.

This commit is contained in:
BZLZHH
2025-05-01 09:22:50 +08:00
parent 8ab90e8e60
commit 04976daa9f
35 changed files with 65 additions and 66 deletions
@@ -0,0 +1,24 @@
//
// Created by BZLZHH on 2025/3/15.
//
#include "LookUp.h"
#include "../../../../Includes.h"
namespace MG_GL::GLX {
void* GetProcAddress(const char *name) {
void* proc = dlsym(RTLD_DEFAULT, (const char*)name);
if (!proc) {
MG_Util::Debug::LogW("Failed to get function: %s", (const char*)name);
return nullptr;
}
return proc;
}
void* GetProcAddressARB(const char *name) {
return GetProcAddress(name);
}
}
@@ -0,0 +1,12 @@
//
// Created by BZLZHH on 2025/3/15.
//
#ifndef MOBILEGL_LOOKUP_H
#define MOBILEGL_LOOKUP_H
namespace MG_GL::GLX {
void* GetProcAddress(const char *name);
void* GetProcAddressARB(const char *name);
}
#endif //MOBILEGL_LOOKUP_H