Lines 1-60
Link Here
|
1 |
--- src/glext.c.orig Thu Jan 8 01:04:04 2004 |
|
|
2 |
+++ src/glext.c Thu Jan 22 16:32:43 2004 |
3 |
@@ -20,7 +20,7 @@ |
4 |
# include "allegrogl/GLext/gl_ext_api.h" |
5 |
#ifdef ALLEGRO_WINDOWS |
6 |
# include "allegrogl/GLext/wgl_ext_api.h" |
7 |
-#elif defined ALLEGRO_LINUX |
8 |
+#elif defined ALLEGRO_LINUX || defined __FreeBSD__ |
9 |
# include "allegrogl/GLext/glx_ext_api.h" |
10 |
#endif |
11 |
} AGL_EXT; |
12 |
@@ -105,7 +105,7 @@ |
13 |
#define AGL_API(type, name, args) AGL_##name##_t wgl##name = NULL; |
14 |
# include "allegrogl/GLext/wgl_ext_api.h" |
15 |
#undef AGL_API |
16 |
-#elif defined ALLEGRO_LINUX |
17 |
+#elif defined ALLEGRO_LINUX || defined __FreeBSD__ |
18 |
#define AGL_API(type, name, args) AGL_##name##_t glX##name = NULL; |
19 |
# include "allegrogl/GLext/glx_ext_api.h" |
20 |
#undef AGL_API |
21 |
@@ -153,7 +153,7 @@ |
22 |
if (ext->name) { AGL_LOG(2,"wgl" #name " successfully loaded\n"); } |
23 |
# include "allegrogl/GLext/wgl_ext_api.h" |
24 |
# undef AGL_API |
25 |
-# elif defined ALLEGRO_LINUX |
26 |
+# elif defined ALLEGRO_LINUX || defined __FreeBSD__ |
27 |
# define AGL_API(type, name, args) \ |
28 |
ext->name = (AGL_##name##_t)aglXGetProcAddress("gl" #name); \ |
29 |
if (ext->name) { AGL_LOG(2,"gl" #name " successfully loaded\n"); } |
30 |
@@ -197,7 +197,7 @@ |
31 |
#define AGL_API(type, name, args) wgl##name = ext->name; |
32 |
# include "allegrogl/GLext/wgl_ext_api.h" |
33 |
#undef AGL_API |
34 |
-#elif defined ALLEGRO_LINUX |
35 |
+#elif defined ALLEGRO_LINUX || defined __FreeBSD__ |
36 |
#define AGL_API(type, name, args) glX##name = ext->name; |
37 |
# include "allegrogl/GLext/glx_ext_api.h" |
38 |
#undef AGL_API |
39 |
@@ -344,7 +344,7 @@ |
40 |
* we try to find the symbol into the dynamic libs |
41 |
* that are already loaded (e.g. in libGL.so) |
42 |
*/ |
43 |
- symbol = dlsym(0, name); |
44 |
+ symbol = dlsym(RTLD_NEXT, name); |
45 |
} |
46 |
#elif defined ALLEGRO_MACOSX |
47 |
function = CFStringCreateWithCString(kCFAllocatorDefault, name, |
48 |
@@ -439,10 +439,10 @@ |
49 |
|
50 |
/* Get glXGetProcAddress entry */ |
51 |
#ifdef ALLEGROGL_HAVE_DYNAMIC_LINK |
52 |
- aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(0, |
53 |
+ aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(RTLD_NEXT, |
54 |
"glXGetProcAddressARB"); |
55 |
if (!aglXGetProcAddress) { |
56 |
- aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(0, |
57 |
+ aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(RTLD_NEXT, |
58 |
"glXGetProcAddress"); |
59 |
} |
60 |
TRACE("glXGetProcAddress Extension: %s\n", |