diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2011-12-01 21:09:57 +0000 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2011-12-01 21:09:57 +0000 |
commit | 1cfd89b2bb73c94340d61936a72bec346c3ca22d (patch) | |
tree | 627a8fda0b00009fa8564b217e3ac56c24f2a29d /glws_egl_xlib.cpp | |
parent | 641493c219b52d39d68b1125b6ff5201ce861ffa (diff) |
Cleanup glproc.
Based on some of Alexandros Frantzis code/ideas.
Diffstat (limited to 'glws_egl_xlib.cpp')
-rw-r--r-- | glws_egl_xlib.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/glws_egl_xlib.cpp b/glws_egl_xlib.cpp index 958e951..eb284ab 100644 --- a/glws_egl_xlib.cpp +++ b/glws_egl_xlib.cpp @@ -29,9 +29,10 @@ #include <iostream> -#include "glws.hpp" +#include <dlfcn.h> #include "glproc.hpp" +#include "glws.hpp" namespace glws { @@ -229,6 +230,13 @@ init(void) { screen = DefaultScreen(display); + __libGlHandle = dlopen("libEGL.so", RTLD_GLOBAL | RTLD_LAZY); + if (!__libGlHandle) { + std::cerr << "error: unable to open libEGL.so\n"; + XCloseDisplay(display); + exit(1); + } + eglDisplay = eglGetDisplay(display); if (eglDisplay == EGL_NO_DISPLAY) { std::cerr << "error: unable to get EGL display\n"; |