Rebase patches for fixing haiku build.
This commit is contained in:
6
thirdparty/glad/glad.c
vendored
6
thirdparty/glad/glad.c
vendored
@ -77,7 +77,7 @@ void close_gl(void) {
|
||||
#include <dlfcn.h>
|
||||
static void* libGL;
|
||||
|
||||
#ifndef __APPLE__
|
||||
#if !defined(__APPLE__) && !defined(__HAIKU__)
|
||||
typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
|
||||
static PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
|
||||
#endif
|
||||
@ -100,7 +100,7 @@ int open_gl(void) {
|
||||
libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL);
|
||||
|
||||
if(libGL != NULL) {
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(__HAIKU__)
|
||||
return 1;
|
||||
#else
|
||||
gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL,
|
||||
@ -127,7 +127,7 @@ void* get_proc(const char *namez) {
|
||||
void* result = NULL;
|
||||
if(libGL == NULL) return NULL;
|
||||
|
||||
#ifndef __APPLE__
|
||||
#if !defined(__APPLE__) && !defined(__HAIKU__)
|
||||
if(gladGetProcAddressPtr != NULL) {
|
||||
result = gladGetProcAddressPtr(namez);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user