mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
34 lines
680 B
C++
Executable file
34 lines
680 B
C++
Executable file
#include <mach-o/dyld.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
bool Sys_GLOpenLibrary(const char* LibName)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
void Sys_GLCloseLibrary()
|
|
{
|
|
}
|
|
|
|
void* Sys_GLGetProc(const char* ProcName)
|
|
{
|
|
NSSymbol Symbol = NULL;
|
|
char* SymbolName;
|
|
|
|
// Prepend a '_' for the Unix C symbol mangling convention.
|
|
SymbolName = (char*)malloc(strlen(ProcName) + 2);
|
|
strcpy(SymbolName + 1, ProcName);
|
|
SymbolName[0] = '_';
|
|
|
|
if (NSIsSymbolNameDefined(SymbolName))
|
|
Symbol = NSLookupAndBindSymbol(SymbolName);
|
|
free(SymbolName);
|
|
|
|
return Symbol ? NSAddressOfSymbol(Symbol) : NULL;
|
|
}
|
|
|
|
void* Sys_GLGetExtension(const char* ProcName)
|
|
{
|
|
return Sys_GLGetProc(ProcName);
|
|
}
|