diff options
author | José Fonseca <jfonseca@vmware.com> | 2011-07-15 16:08:28 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-07-15 16:08:28 +0100 |
commit | c06c131d79abaea87bc97548163c5fd9ac39e119 (patch) | |
tree | 5254bea32f64b17d44f002e211ad0c1eeba046a6 | |
parent | 81469c15be2a5abc49616fd6e51b74dba2b1fbb7 (diff) |
Don't depend on glut to get proc addresses on MacOSX.
dlsym() is all one needs.
-rw-r--r-- | src/glean/glutils.cpp | 4 | ||||
-rw-r--r-- | src/glh/glwrap.h | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/glean/glutils.cpp b/src/glean/glutils.cpp index 2c8ab60..70cf0cc 100644 --- a/src/glean/glutils.cpp +++ b/src/glean/glutils.cpp @@ -37,7 +37,7 @@ #include "environ.h" #include "lex.h" #include "glutils.h" -#if defined(__X11__) +#if defined(__X11__) || defined(__AGL__) # include <dlfcn.h> #endif #if defined(__AGL__) @@ -141,7 +141,7 @@ void # error "Need GetProcAddress (or equivalent) for BeOS" return 0; #elif defined(__AGL__) - return reinterpret_cast<void (*)()>(glutGetProcAddress(name)); + return reinterpret_cast<void (*)()>(dlsym(RTLD_DEFAULT, name)); #endif } // getProcAddress diff --git a/src/glh/glwrap.h b/src/glh/glwrap.h index 8463eb3..91e5d48 100644 --- a/src/glh/glwrap.h +++ b/src/glh/glwrap.h @@ -74,7 +74,6 @@ # include <Carbon/Carbon.h> # include <OpenGL/glu.h> # include <OpenGL/glext.h> -# include <GLUT/glut.h> # include <AGL/agl.h> # include <AGL/aglRenderers.h> # if !defined(APIENTRY) |