aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/unix/gl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libui_sdl/libui/unix/gl.c')
-rw-r--r--src/libui_sdl/libui/unix/gl.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libui_sdl/libui/unix/gl.c b/src/libui_sdl/libui/unix/gl.c
index 6965969..4a180ef 100644
--- a/src/libui_sdl/libui/unix/gl.c
+++ b/src/libui_sdl/libui/unix/gl.c
@@ -2,8 +2,8 @@
#include "uipriv_unix.h"
#include <GL/gl.h>
-
-void* glXGetProcAddressARB(const GLubyte* name);
+#include <GL/glx.h>
+#include <EGL/egl.h>
extern GThread* gtkthread;
extern GMutex glmutex;
@@ -220,10 +220,15 @@ void *uiGLGetProcAddress(const char* proc)
{
// TODO: consider using epoxy or something funny
- void* ptr = dlsym(NULL /* RTLD_DEFAULT */, proc);
+ void* ptr;
+
+ ptr = glXGetProcAddressARB((const GLubyte*)proc);
+ if (ptr) return ptr;
+
+ ptr = eglGetProcAddress(proc);
if (ptr) return ptr;
- ptr = glXGetProcAddressARB((const GLubyte*)proc);
+ ptr = dlsym(NULL /* RTLD_DEFAULT */, proc);
if (ptr) return ptr;
return NULL;