File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
2.7.0.9
2
2
--------
3
- * Windows/Linux: The GLUT package compiles without any additional GLUT library now.
3
+ * The GLUT package compiles without any additional library/framework now.
4
4
* Windows: We search for a native freeglut DLL, a MinGW freeglut DLL and a classic GLUT DLL, in that order.
5
5
6
6
2.7.0.8
Original file line number Diff line number Diff line change @@ -103,8 +103,6 @@ library
103
103
else
104
104
cpp-options : "-DCALLCONV=ccall"
105
105
cc-options : "-DUSE_DLSYM"
106
- if os(darwin)
107
- frameworks : GLUT
108
106
109
107
executable BOGLGP01-OnYourOwn1
110
108
if !flag(BuildExamples)
Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ hs_GLUT_getProcAddress(const char *name)
48
48
#include <stdlib.h>
49
49
#include <dlfcn.h>
50
50
51
+ #ifdef __APPLE__
52
+ #define FILENAME "/System/Library/Frameworks/GLUT.framework/GLUT"
53
+ #else
54
+ #define FILENAME "libglut.so"
55
+ #endif
56
+
51
57
void *
52
58
hs_GLUT_getProcAddress (const char * name )
53
59
{
@@ -56,7 +62,7 @@ hs_GLUT_getProcAddress(const char *name)
56
62
57
63
if (firstTime ) {
58
64
firstTime = 0 ;
59
- handle = dlopen ("libglut.so" , RTLD_LAZY );
65
+ handle = dlopen (FILENAME , RTLD_LAZY | RTLD_GLOBAL );
60
66
}
61
67
62
68
return handle ? dlsym (handle , name ) : NULL ;
You can’t perform that action at this time.
0 commit comments