diff options
author | Kirill Ponomarev <krion@FreeBSD.org> | 2004-01-23 10:02:47 +0000 |
---|---|---|
committer | Kirill Ponomarev <krion@FreeBSD.org> | 2004-01-23 10:02:47 +0000 |
commit | bdf202c987d1bd7d6555d86dddec8e636842ae62 (patch) | |
tree | c8f0729499c34e293af7c1892f5c8328d958e261 /graphics/allegrogl/files/patch-src-glext.c | |
parent | Add glbsp 2.05, (diff) |
Add allegrogl 0.2.0,
The library mostly provides functions to allow you to use
OpenGL alongside Allegro -- you use OpenGL for your rendering
to the screen, and Allegro for miscellaneous tasks like
gathering input, doing timers, getting cross-platform
portability, loading data, playing samples and drawing your
textures. So this library fills the same hole that things like
GLUT do.
PR: ports/61763
Submitted by: Igor Pokrovsky <tiamat@comset.net>
Diffstat (limited to 'graphics/allegrogl/files/patch-src-glext.c')
-rw-r--r-- | graphics/allegrogl/files/patch-src-glext.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/graphics/allegrogl/files/patch-src-glext.c b/graphics/allegrogl/files/patch-src-glext.c new file mode 100644 index 000000000000..0010d599dad0 --- /dev/null +++ b/graphics/allegrogl/files/patch-src-glext.c @@ -0,0 +1,60 @@ +--- src/glext.c.orig Thu Jan 8 01:04:04 2004 ++++ src/glext.c Thu Jan 22 16:32:43 2004 +@@ -20,7 +20,7 @@ + # include "allegrogl/GLext/gl_ext_api.h" + #ifdef ALLEGRO_WINDOWS + # include "allegrogl/GLext/wgl_ext_api.h" +-#elif defined ALLEGRO_LINUX ++#elif defined ALLEGRO_LINUX || defined __FreeBSD__ + # include "allegrogl/GLext/glx_ext_api.h" + #endif + } AGL_EXT; +@@ -105,7 +105,7 @@ + #define AGL_API(type, name, args) AGL_##name##_t wgl##name = NULL; + # include "allegrogl/GLext/wgl_ext_api.h" + #undef AGL_API +-#elif defined ALLEGRO_LINUX ++#elif defined ALLEGRO_LINUX || defined __FreeBSD__ + #define AGL_API(type, name, args) AGL_##name##_t glX##name = NULL; + # include "allegrogl/GLext/glx_ext_api.h" + #undef AGL_API +@@ -153,7 +153,7 @@ + if (ext->name) { AGL_LOG(2,"wgl" #name " successfully loaded\n"); } + # include "allegrogl/GLext/wgl_ext_api.h" + # undef AGL_API +-# elif defined ALLEGRO_LINUX ++# elif defined ALLEGRO_LINUX || defined __FreeBSD__ + # define AGL_API(type, name, args) \ + ext->name = (AGL_##name##_t)aglXGetProcAddress("gl" #name); \ + if (ext->name) { AGL_LOG(2,"gl" #name " successfully loaded\n"); } +@@ -197,7 +197,7 @@ + #define AGL_API(type, name, args) wgl##name = ext->name; + # include "allegrogl/GLext/wgl_ext_api.h" + #undef AGL_API +-#elif defined ALLEGRO_LINUX ++#elif defined ALLEGRO_LINUX || defined __FreeBSD__ + #define AGL_API(type, name, args) glX##name = ext->name; + # include "allegrogl/GLext/glx_ext_api.h" + #undef AGL_API +@@ -344,7 +344,7 @@ + * we try to find the symbol into the dynamic libs + * that are already loaded (e.g. in libGL.so) + */ +- symbol = dlsym(0, name); ++ symbol = dlsym(RTLD_NEXT, name); + } + #elif defined ALLEGRO_MACOSX + function = CFStringCreateWithCString(kCFAllocatorDefault, name, +@@ -439,10 +439,10 @@ + + /* Get glXGetProcAddress entry */ + #ifdef ALLEGROGL_HAVE_DYNAMIC_LINK +- aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(0, ++ aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(RTLD_NEXT, + "glXGetProcAddressARB"); + if (!aglXGetProcAddress) { +- aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(0, ++ aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(RTLD_NEXT, + "glXGetProcAddress"); + } + TRACE("glXGetProcAddress Extension: %s\n", |