From: Jose F. <jrf...@us...> - 2011-07-15 15:14:47
|
Module: glean Branch: cmake Commit: c06c131d79abaea87bc97548163c5fd9ac39e119 URL: no.cgit.repo/commit/?id=c06c131d79abaea87bc97548163c5fd9ac39e119 Author: José Fonseca <jfo...@vm...> Date: Fri Jul 15 16:08:28 2011 +0100 Don't depend on glut to get proc addresses on MacOSX. dlsym() is all one needs. --- src/glean/glutils.cpp | 4 ++-- 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) |