From 890c5702da91f4994b9547a9662922f553fe95ec Mon Sep 17 00:00:00 2001
From: Joe Groff <arcata@gmail.com>
Date: Fri, 8 Feb 2008 18:18:44 -0800
Subject: [PATCH] On second thought, no point in being clever with
 glXGetProcAddress. Just always use glXGetProcAddressARB, which should always
 be available on any GLX implementation with any extension support

---
 extra/opengl/gl/unix/unix.factor |  2 +-
 extra/x11/glx/glx.factor         | 12 +++---------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/extra/opengl/gl/unix/unix.factor b/extra/opengl/gl/unix/unix.factor
index d36e4a2906..3352b18350 100644
--- a/extra/opengl/gl/unix/unix.factor
+++ b/extra/opengl/gl/unix/unix.factor
@@ -2,5 +2,5 @@ USING: kernel x11.glx ;
 IN: opengl.gl.unix
 
 : gl-function-context ( -- context ) glXGetCurrentContext ; inline
-: gl-function-address ( name -- address ) glXGetProcAddress ; inline
+: gl-function-address ( name -- address ) glXGetProcAddressARB ; inline
 : gl-function-calling-convention ( -- str ) "cdecl" ; inline
diff --git a/extra/x11/glx/glx.factor b/extra/x11/glx/glx.factor
index 9107c2d394..a8608235f2 100644
--- a/extra/x11/glx/glx.factor
+++ b/extra/x11/glx/glx.factor
@@ -78,17 +78,11 @@ FUNCTION: void glXSelectEvent ( Display* dpy, GLXDrawable draw, ulong event_mask
 FUNCTION: void glXGetSelectedEvent ( Display* dpy, GLXDrawable draw, ulong* event_mask ) ;
 
 ! GLX 1.4 and later
-! Fall back to the extension function glXGetProcAddressARB if necessary
-<< "glx" load-library "glXGetProcAddress" dlsym
-    [ "void*" "glx" "glXGetProcAddress" { "char*" "procname" } define-function ]
-    [
-        "void*" "glx" "glXGetProcAddressARB" { "char*" "procname" } define-function
-        "glXGetProcAddress" create-in [ glXGetProcAddressARB ] define make-inline
-    ]
-    if >>
-    
 FUNCTION: void* glXGetProcAddress ( char* procname ) ;
 
+! GLX_ARB_get_proc_address extension
+FUNCTION: void* glXGetProcAddressARB ( char* procname ) ;
+
 ! GLX Events
 ! (also skipped for now. only has GLXPbufferClobberEvent, the rest is handled by xlib methinks