[Xquartz-changes] mesa: Branch 'master' - 21 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Mon Jun 13 14:51:45 PDT 2011


 src/egl/drivers/dri2/egl_dri2.c           |   62 
 src/egl/drivers/dri2/egl_dri2.h           |    3 
 src/egl/drivers/dri2/platform_x11.c       |    4 
 src/egl/wayland/wayland-drm/Makefile      |    1 
 src/gallium/drivers/i915/i915_reg.h       |    7 
 src/gallium/drivers/r600/r600_asm.c       |    2 
 src/gallium/drivers/r600/r600_pipe.c      |    5 
 src/gallium/drivers/r600/r600_shader.c    |    3 
 src/gallium/drivers/r600/r600_state.c     |    2 
 src/gallium/drivers/r600/r600_translate.c |    1 
 src/gallium/winsys/r600/drm/r600_bo.c     |   52 
 src/glx/applegl_glx.c                     |    3 
 src/glx/glxclient.h                       |    1 
 src/glx/glxcmds.c                         |    3 
 src/glx/glxcurrent.c                      |   23 
 src/mapi/glapi/gen/gl_gentable.py         |   11 
 src/mapi/glapi/glapi_gentable.c           | 6474 +++++++++++++++++-------------
 src/mapi/mapi/entry_x86-64_tls.h          |    4 
 src/mapi/mapi/entry_x86_tls.h             |    6 
 src/mapi/mapi/entry_x86_tsd.h             |    5 
 src/mesa/SConscript                       |    2 
 src/mesa/drivers/common/driverfuncs.c     |    5 
 src/mesa/drivers/dri/intel/intel_fbo.c    |    8 
 src/mesa/drivers/dri/radeon/radeon_fbo.c  |    8 
 src/mesa/main/texgetimage.c               |   28 
 src/mesa/main/texrender.c                 |  654 ---
 src/mesa/main/texrender.h                 |   18 
 src/mesa/sources.mak                      |    2 
 src/mesa/state_tracker/st_draw.c          |    3 
 src/mesa/swrast/s_texrender.c             |  654 +++
 src/mesa/swrast/swrast.h                  |   10 
 src/mesa/vbo/vbo_exec_array.c             |    8 
 32 files changed, 4701 insertions(+), 3371 deletions(-)

New commits:
commit 5e51db735695c1a8074eca457a0a89b2bbede1ba
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Jun 13 09:31:21 2011 -0700

    glx: Bind to our context before __glXSetCurrentContext
    
    We want to bind to our context before calling __glXSetCurrentContext or
    messing with the gc rect in order to properly handle error conditions.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c
index 064fd71..9027734 100644
--- a/src/glx/glxcurrent.c
+++ b/src/glx/glxcurrent.c
@@ -212,7 +212,6 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
 {
    struct glx_context *gc = (struct glx_context *) gc_user;
    struct glx_context *oldGC = __glXGetCurrentContext();
-   int ret = Success;
 
    /* XXX: If this is left out, then libGL ends up not having this
     * symbol, and drivers using it fail to load.  Compare the
@@ -268,24 +267,32 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
    }
 
    if (gc) {
+      /* Attempt to bind the context.  We do this before mucking with
+       * gc and __glXSetCurrentContext to properly handle our state in
+       * case of an error.
+       *
+       * If an error occurs, set the Null context since we've already
+       * blown away our old context.  The caller is responsible for
+       * figuring out how to handle setting a valid context.
+       */
+      if (gc->vtable->bind(gc, oldGC, draw, read) != Success) {
+         __glXSetCurrentContextNull();
+         __glXUnlock();
+         __glXGenerateError(dpy, None, GLXBadContext, X_GLXMakeContextCurrent);
+         return GL_FALSE;
+      }
+
       if (gc->thread_refcount++ == 0) {
 	 gc->currentDpy = dpy;
 	 gc->currentDrawable = draw;
 	 gc->currentReadable = read;
       }
       __glXSetCurrentContext(gc);
-      ret = gc->vtable->bind(gc, oldGC, draw, read);
    } else {
       __glXSetCurrentContextNull();
    }
 
    __glXUnlock();
-
-   if (ret) {
-      __glXGenerateError(dpy, None, ret, X_GLXMakeContextCurrent);
-      return GL_FALSE;
-   }
-
    return GL_TRUE;
 }
 
commit 816b8acfe81d5e2d666eb926f669d6015df0bbac
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Jun 13 12:13:44 2011 -0700

    glx: Remove check for gc->vtable->destroy
    
    gc->vtable->destroy is always set and is used unconditionally
    in other places, so don't bother checking for it first.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 774d38b..cd8bc97 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -377,8 +377,7 @@ DestroyContext(Display * dpy, GLXContext ctx)
    }
    __glXUnlock();
 
-   if (gc->vtable->destroy)
-      gc->vtable->destroy(gc);
+   gc->vtable->destroy(gc);
 }
 
 _X_EXPORT void
commit c6cf82fb553405bee241170f6e51cafd751d46ea
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Jun 13 12:00:55 2011 -0700

    apple: applegl_destroy_context: Pass along the correct display
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/src/glx/applegl_glx.c b/src/glx/applegl_glx.c
index 8e5bc0b..92c785f 100644
--- a/src/glx/applegl_glx.c
+++ b/src/glx/applegl_glx.c
@@ -43,7 +43,7 @@
 static void
 applegl_destroy_context(struct glx_context *gc)
 {
-   apple_glx_destroy_context(&gc->driContext, gc->currentDpy);
+   apple_glx_destroy_context(&gc->driContext, gc->psc->dpy);
 }
 
 static int
commit e903cc17bbf7152b3f7d64fe7fbb5ceebcc7452e
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Jun 13 12:10:38 2011 -0700

    apple: Dead code removal
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/src/glx/applegl_glx.c b/src/glx/applegl_glx.c
index 9b8605f..8e5bc0b 100644
--- a/src/glx/applegl_glx.c
+++ b/src/glx/applegl_glx.c
@@ -116,7 +116,6 @@ applegl_create_context(struct glx_screen *psc,
 
    gc->vtable = &applegl_context_vtable;
    gc->driContext = NULL;
-   gc->do_destroy = False;
 
    /* TODO: darwin: Integrate with above to do indirect */
    if(apple_glx_create_context(&gc->driContext, dpy, screen, config, 
diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h
index 9262f86..fa2e2d3 100644
--- a/src/glx/glxclient.h
+++ b/src/glx/glxclient.h
@@ -335,7 +335,6 @@ struct glx_context
 
 #if defined(GLX_DIRECT_RENDERING) && defined(GLX_USE_APPLEGL)
    void *driContext;
-   Bool do_destroy;
 #endif
 
     /**
commit b44d13e67bfe81b2d7af4aeda2c3caf7f252bd0f
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Jun 13 11:35:18 2011 -0700

    glapi: Add check for NULL symbol_prefix in gentable and fix warnings
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py
index 0dfebf8..73986f2 100644
--- a/src/mapi/glapi/gen/gl_gentable.py
+++ b/src/mapi/glapi/gen/gl_gentable.py
@@ -42,7 +42,6 @@ header = """
 
 #include "glapi.h"
 #include "glapitable.h"
-#include "main/dispatch.h"
 
 struct _glapi_table *
 _glapi_create_table_from_handle(void *handle, const char *symbol_prefix) {
@@ -50,7 +49,10 @@ _glapi_create_table_from_handle(void *handle, const char *symbol_prefix) {
     char symboln[512];
 
     if(!disp)
-         return NULL;
+        return NULL;
+
+    if(symbol_prefix == NULL)
+        symbol_prefix = "";
 """
 
 footer = """
@@ -60,8 +62,9 @@ footer = """
 
 body_template = """
     if(!disp->%(name)s) {
-         snprintf(symboln, sizeof(symboln), "%%s%(entry_point)s", symbol_prefix);
-         SET_%(name)s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%%s%(entry_point)s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->%(name)s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 """
 
diff --git a/src/mapi/glapi/glapi_gentable.c b/src/mapi/glapi/glapi_gentable.c
index 7f09b41..dcbed1c 100644
--- a/src/mapi/glapi/glapi_gentable.c
+++ b/src/mapi/glapi/glapi_gentable.c
@@ -36,7769 +36,9063 @@
 
 #include "glapi.h"
 #include "glapitable.h"
-#include "main/dispatch.h"
 
 struct _glapi_table *
 _glapi_create_table_from_handle(void *handle, const char *symbol_prefix) {
-   struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table));
-   char symboln[512];
+    struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table));
+    char symboln[512];
 
-   if(!disp)
-       return NULL;
+    if(!disp)
+        return NULL;
+
+    if(symbol_prefix == NULL)
+        symbol_prefix = "";
 
 
     if(!disp->NewList) {
-         snprintf(symboln, sizeof(symboln), "%sNewList", symbol_prefix);
-         SET_NewList(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNewList", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->NewList;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EndList) {
-         snprintf(symboln, sizeof(symboln), "%sEndList", symbol_prefix);
-         SET_EndList(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEndList", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EndList;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CallList) {
-         snprintf(symboln, sizeof(symboln), "%sCallList", symbol_prefix);
-         SET_CallList(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCallList", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CallList;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CallLists) {
-         snprintf(symboln, sizeof(symboln), "%sCallLists", symbol_prefix);
-         SET_CallLists(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCallLists", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CallLists;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteLists) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteLists", symbol_prefix);
-         SET_DeleteLists(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteLists", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteLists;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenLists) {
-         snprintf(symboln, sizeof(symboln), "%sGenLists", symbol_prefix);
-         SET_GenLists(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenLists", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenLists;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ListBase) {
-         snprintf(symboln, sizeof(symboln), "%sListBase", symbol_prefix);
-         SET_ListBase(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sListBase", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ListBase;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Begin) {
-         snprintf(symboln, sizeof(symboln), "%sBegin", symbol_prefix);
-         SET_Begin(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBegin", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Begin;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Bitmap) {
-         snprintf(symboln, sizeof(symboln), "%sBitmap", symbol_prefix);
-         SET_Bitmap(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBitmap", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Bitmap;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3b) {
-         snprintf(symboln, sizeof(symboln), "%sColor3b", symbol_prefix);
-         SET_Color3b(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3b", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3b;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3bv) {
-         snprintf(symboln, sizeof(symboln), "%sColor3bv", symbol_prefix);
-         SET_Color3bv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3bv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3bv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3d) {
-         snprintf(symboln, sizeof(symboln), "%sColor3d", symbol_prefix);
-         SET_Color3d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3dv) {
-         snprintf(symboln, sizeof(symboln), "%sColor3dv", symbol_prefix);
-         SET_Color3dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3f) {
-         snprintf(symboln, sizeof(symboln), "%sColor3f", symbol_prefix);
-         SET_Color3f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3fv) {
-         snprintf(symboln, sizeof(symboln), "%sColor3fv", symbol_prefix);
-         SET_Color3fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3i) {
-         snprintf(symboln, sizeof(symboln), "%sColor3i", symbol_prefix);
-         SET_Color3i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3iv) {
-         snprintf(symboln, sizeof(symboln), "%sColor3iv", symbol_prefix);
-         SET_Color3iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3s) {
-         snprintf(symboln, sizeof(symboln), "%sColor3s", symbol_prefix);
-         SET_Color3s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3sv) {
-         snprintf(symboln, sizeof(symboln), "%sColor3sv", symbol_prefix);
-         SET_Color3sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3ub) {
-         snprintf(symboln, sizeof(symboln), "%sColor3ub", symbol_prefix);
-         SET_Color3ub(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3ub", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3ub;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3ubv) {
-         snprintf(symboln, sizeof(symboln), "%sColor3ubv", symbol_prefix);
-         SET_Color3ubv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3ubv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3ubv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3ui) {
-         snprintf(symboln, sizeof(symboln), "%sColor3ui", symbol_prefix);
-         SET_Color3ui(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3ui", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3ui;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3uiv) {
-         snprintf(symboln, sizeof(symboln), "%sColor3uiv", symbol_prefix);
-         SET_Color3uiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3uiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3us) {
-         snprintf(symboln, sizeof(symboln), "%sColor3us", symbol_prefix);
-         SET_Color3us(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3us", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3us;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color3usv) {
-         snprintf(symboln, sizeof(symboln), "%sColor3usv", symbol_prefix);
-         SET_Color3usv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor3usv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color3usv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4b) {
-         snprintf(symboln, sizeof(symboln), "%sColor4b", symbol_prefix);
-         SET_Color4b(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4b", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4b;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4bv) {
-         snprintf(symboln, sizeof(symboln), "%sColor4bv", symbol_prefix);
-         SET_Color4bv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4bv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4bv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4d) {
-         snprintf(symboln, sizeof(symboln), "%sColor4d", symbol_prefix);
-         SET_Color4d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4dv) {
-         snprintf(symboln, sizeof(symboln), "%sColor4dv", symbol_prefix);
-         SET_Color4dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4f) {
-         snprintf(symboln, sizeof(symboln), "%sColor4f", symbol_prefix);
-         SET_Color4f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4fv) {
-         snprintf(symboln, sizeof(symboln), "%sColor4fv", symbol_prefix);
-         SET_Color4fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4i) {
-         snprintf(symboln, sizeof(symboln), "%sColor4i", symbol_prefix);
-         SET_Color4i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4iv) {
-         snprintf(symboln, sizeof(symboln), "%sColor4iv", symbol_prefix);
-         SET_Color4iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4s) {
-         snprintf(symboln, sizeof(symboln), "%sColor4s", symbol_prefix);
-         SET_Color4s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4sv) {
-         snprintf(symboln, sizeof(symboln), "%sColor4sv", symbol_prefix);
-         SET_Color4sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4ub) {
-         snprintf(symboln, sizeof(symboln), "%sColor4ub", symbol_prefix);
-         SET_Color4ub(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4ub", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4ub;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4ubv) {
-         snprintf(symboln, sizeof(symboln), "%sColor4ubv", symbol_prefix);
-         SET_Color4ubv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4ubv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4ubv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4ui) {
-         snprintf(symboln, sizeof(symboln), "%sColor4ui", symbol_prefix);
-         SET_Color4ui(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4ui", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4ui;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4uiv) {
-         snprintf(symboln, sizeof(symboln), "%sColor4uiv", symbol_prefix);
-         SET_Color4uiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4uiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4us) {
-         snprintf(symboln, sizeof(symboln), "%sColor4us", symbol_prefix);
-         SET_Color4us(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4us", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4us;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Color4usv) {
-         snprintf(symboln, sizeof(symboln), "%sColor4usv", symbol_prefix);
-         SET_Color4usv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColor4usv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Color4usv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EdgeFlag) {
-         snprintf(symboln, sizeof(symboln), "%sEdgeFlag", symbol_prefix);
-         SET_EdgeFlag(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEdgeFlag", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EdgeFlag;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EdgeFlagv) {
-         snprintf(symboln, sizeof(symboln), "%sEdgeFlagv", symbol_prefix);
-         SET_EdgeFlagv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEdgeFlagv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EdgeFlagv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->End) {
-         snprintf(symboln, sizeof(symboln), "%sEnd", symbol_prefix);
-         SET_End(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEnd", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->End;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Indexd) {
-         snprintf(symboln, sizeof(symboln), "%sIndexd", symbol_prefix);
-         SET_Indexd(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexd", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Indexd;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Indexdv) {
-         snprintf(symboln, sizeof(symboln), "%sIndexdv", symbol_prefix);
-         SET_Indexdv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexdv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Indexdv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Indexf) {
-         snprintf(symboln, sizeof(symboln), "%sIndexf", symbol_prefix);
-         SET_Indexf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Indexf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Indexfv) {
-         snprintf(symboln, sizeof(symboln), "%sIndexfv", symbol_prefix);
-         SET_Indexfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Indexfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Indexi) {
-         snprintf(symboln, sizeof(symboln), "%sIndexi", symbol_prefix);
-         SET_Indexi(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexi", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Indexi;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Indexiv) {
-         snprintf(symboln, sizeof(symboln), "%sIndexiv", symbol_prefix);
-         SET_Indexiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Indexiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Indexs) {
-         snprintf(symboln, sizeof(symboln), "%sIndexs", symbol_prefix);
-         SET_Indexs(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexs", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Indexs;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Indexsv) {
-         snprintf(symboln, sizeof(symboln), "%sIndexsv", symbol_prefix);
-         SET_Indexsv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexsv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Indexsv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Normal3b) {
-         snprintf(symboln, sizeof(symboln), "%sNormal3b", symbol_prefix);
-         SET_Normal3b(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormal3b", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Normal3b;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Normal3bv) {
-         snprintf(symboln, sizeof(symboln), "%sNormal3bv", symbol_prefix);
-         SET_Normal3bv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormal3bv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Normal3bv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Normal3d) {
-         snprintf(symboln, sizeof(symboln), "%sNormal3d", symbol_prefix);
-         SET_Normal3d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormal3d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Normal3d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Normal3dv) {
-         snprintf(symboln, sizeof(symboln), "%sNormal3dv", symbol_prefix);
-         SET_Normal3dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormal3dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Normal3dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Normal3f) {
-         snprintf(symboln, sizeof(symboln), "%sNormal3f", symbol_prefix);
-         SET_Normal3f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormal3f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Normal3f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Normal3fv) {
-         snprintf(symboln, sizeof(symboln), "%sNormal3fv", symbol_prefix);
-         SET_Normal3fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormal3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Normal3fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Normal3i) {
-         snprintf(symboln, sizeof(symboln), "%sNormal3i", symbol_prefix);
-         SET_Normal3i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormal3i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Normal3i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Normal3iv) {
-         snprintf(symboln, sizeof(symboln), "%sNormal3iv", symbol_prefix);
-         SET_Normal3iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormal3iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Normal3iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Normal3s) {
-         snprintf(symboln, sizeof(symboln), "%sNormal3s", symbol_prefix);
-         SET_Normal3s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormal3s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Normal3s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Normal3sv) {
-         snprintf(symboln, sizeof(symboln), "%sNormal3sv", symbol_prefix);
-         SET_Normal3sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormal3sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Normal3sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos2d) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos2d", symbol_prefix);
-         SET_RasterPos2d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos2d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos2dv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos2dv", symbol_prefix);
-         SET_RasterPos2dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos2dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos2f) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos2f", symbol_prefix);
-         SET_RasterPos2f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos2f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos2fv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos2fv", symbol_prefix);
-         SET_RasterPos2fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos2fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos2i) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos2i", symbol_prefix);
-         SET_RasterPos2i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos2i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos2iv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos2iv", symbol_prefix);
-         SET_RasterPos2iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos2iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos2s) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos2s", symbol_prefix);
-         SET_RasterPos2s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos2s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos2sv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos2sv", symbol_prefix);
-         SET_RasterPos2sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos2sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos3d) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos3d", symbol_prefix);
-         SET_RasterPos3d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos3d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos3dv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos3dv", symbol_prefix);
-         SET_RasterPos3dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos3dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos3f) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos3f", symbol_prefix);
-         SET_RasterPos3f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos3f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos3fv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos3fv", symbol_prefix);
-         SET_RasterPos3fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos3i) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos3i", symbol_prefix);
-         SET_RasterPos3i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos3i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos3iv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos3iv", symbol_prefix);
-         SET_RasterPos3iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos3iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos3s) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos3s", symbol_prefix);
-         SET_RasterPos3s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos3s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos3sv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos3sv", symbol_prefix);
-         SET_RasterPos3sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos3sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos4d) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos4d", symbol_prefix);
-         SET_RasterPos4d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos4d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos4dv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos4dv", symbol_prefix);
-         SET_RasterPos4dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos4dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos4f) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos4f", symbol_prefix);
-         SET_RasterPos4f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos4f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos4fv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos4fv", symbol_prefix);
-         SET_RasterPos4fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos4fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos4i) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos4i", symbol_prefix);
-         SET_RasterPos4i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos4i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos4iv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos4iv", symbol_prefix);
-         SET_RasterPos4iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos4iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos4s) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos4s", symbol_prefix);
-         SET_RasterPos4s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos4s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RasterPos4sv) {
-         snprintf(symboln, sizeof(symboln), "%sRasterPos4sv", symbol_prefix);
-         SET_RasterPos4sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRasterPos4sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Rectd) {
-         snprintf(symboln, sizeof(symboln), "%sRectd", symbol_prefix);
-         SET_Rectd(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRectd", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Rectd;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Rectdv) {
-         snprintf(symboln, sizeof(symboln), "%sRectdv", symbol_prefix);
-         SET_Rectdv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRectdv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Rectdv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Rectf) {
-         snprintf(symboln, sizeof(symboln), "%sRectf", symbol_prefix);
-         SET_Rectf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRectf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Rectf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Rectfv) {
-         snprintf(symboln, sizeof(symboln), "%sRectfv", symbol_prefix);
-         SET_Rectfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRectfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Rectfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Recti) {
-         snprintf(symboln, sizeof(symboln), "%sRecti", symbol_prefix);
-         SET_Recti(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRecti", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Recti;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Rectiv) {
-         snprintf(symboln, sizeof(symboln), "%sRectiv", symbol_prefix);
-         SET_Rectiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRectiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Rectiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Rects) {
-         snprintf(symboln, sizeof(symboln), "%sRects", symbol_prefix);
-         SET_Rects(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRects", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Rects;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Rectsv) {
-         snprintf(symboln, sizeof(symboln), "%sRectsv", symbol_prefix);
-         SET_Rectsv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRectsv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Rectsv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord1d) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord1d", symbol_prefix);
-         SET_TexCoord1d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord1d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord1dv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord1dv", symbol_prefix);
-         SET_TexCoord1dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord1dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord1f) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord1f", symbol_prefix);
-         SET_TexCoord1f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord1f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord1fv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord1fv", symbol_prefix);
-         SET_TexCoord1fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord1fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord1i) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord1i", symbol_prefix);
-         SET_TexCoord1i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord1i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord1iv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord1iv", symbol_prefix);
-         SET_TexCoord1iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord1iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord1s) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord1s", symbol_prefix);
-         SET_TexCoord1s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord1s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord1sv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord1sv", symbol_prefix);
-         SET_TexCoord1sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord1sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord2d) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord2d", symbol_prefix);
-         SET_TexCoord2d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord2d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord2dv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord2dv", symbol_prefix);
-         SET_TexCoord2dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord2dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord2f) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord2f", symbol_prefix);
-         SET_TexCoord2f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord2f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord2fv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord2fv", symbol_prefix);
-         SET_TexCoord2fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord2fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord2i) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord2i", symbol_prefix);
-         SET_TexCoord2i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord2i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord2iv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord2iv", symbol_prefix);
-         SET_TexCoord2iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord2iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord2s) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord2s", symbol_prefix);
-         SET_TexCoord2s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord2s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord2sv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord2sv", symbol_prefix);
-         SET_TexCoord2sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord2sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord3d) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord3d", symbol_prefix);
-         SET_TexCoord3d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord3d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord3dv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord3dv", symbol_prefix);
-         SET_TexCoord3dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord3dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord3f) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord3f", symbol_prefix);
-         SET_TexCoord3f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord3f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord3fv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord3fv", symbol_prefix);
-         SET_TexCoord3fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord3i) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord3i", symbol_prefix);
-         SET_TexCoord3i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord3i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord3iv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord3iv", symbol_prefix);
-         SET_TexCoord3iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord3iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord3s) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord3s", symbol_prefix);
-         SET_TexCoord3s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord3s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord3sv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord3sv", symbol_prefix);
-         SET_TexCoord3sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord3sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord4d) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord4d", symbol_prefix);
-         SET_TexCoord4d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord4d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord4dv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord4dv", symbol_prefix);
-         SET_TexCoord4dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord4dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord4f) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord4f", symbol_prefix);
-         SET_TexCoord4f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord4f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord4fv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord4fv", symbol_prefix);
-         SET_TexCoord4fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord4fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord4i) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord4i", symbol_prefix);
-         SET_TexCoord4i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord4i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord4iv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord4iv", symbol_prefix);
-         SET_TexCoord4iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord4iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord4s) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord4s", symbol_prefix);
-         SET_TexCoord4s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord4s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoord4sv) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoord4sv", symbol_prefix);
-         SET_TexCoord4sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoord4sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex2d) {
-         snprintf(symboln, sizeof(symboln), "%sVertex2d", symbol_prefix);
-         SET_Vertex2d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex2d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex2dv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex2dv", symbol_prefix);
-         SET_Vertex2dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex2dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex2f) {
-         snprintf(symboln, sizeof(symboln), "%sVertex2f", symbol_prefix);
-         SET_Vertex2f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex2f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex2fv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex2fv", symbol_prefix);
-         SET_Vertex2fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex2fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex2i) {
-         snprintf(symboln, sizeof(symboln), "%sVertex2i", symbol_prefix);
-         SET_Vertex2i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex2i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex2iv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex2iv", symbol_prefix);
-         SET_Vertex2iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex2iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex2s) {
-         snprintf(symboln, sizeof(symboln), "%sVertex2s", symbol_prefix);
-         SET_Vertex2s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex2s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex2sv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex2sv", symbol_prefix);
-         SET_Vertex2sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex2sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex3d) {
-         snprintf(symboln, sizeof(symboln), "%sVertex3d", symbol_prefix);
-         SET_Vertex3d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex3d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex3dv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex3dv", symbol_prefix);
-         SET_Vertex3dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex3dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex3f) {
-         snprintf(symboln, sizeof(symboln), "%sVertex3f", symbol_prefix);
-         SET_Vertex3f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex3f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex3fv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex3fv", symbol_prefix);
-         SET_Vertex3fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex3i) {
-         snprintf(symboln, sizeof(symboln), "%sVertex3i", symbol_prefix);
-         SET_Vertex3i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex3i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex3iv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex3iv", symbol_prefix);
-         SET_Vertex3iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex3iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex3s) {
-         snprintf(symboln, sizeof(symboln), "%sVertex3s", symbol_prefix);
-         SET_Vertex3s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex3s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex3sv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex3sv", symbol_prefix);
-         SET_Vertex3sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex3sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex4d) {
-         snprintf(symboln, sizeof(symboln), "%sVertex4d", symbol_prefix);
-         SET_Vertex4d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex4d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex4dv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex4dv", symbol_prefix);
-         SET_Vertex4dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex4dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex4f) {
-         snprintf(symboln, sizeof(symboln), "%sVertex4f", symbol_prefix);
-         SET_Vertex4f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex4f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex4fv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex4fv", symbol_prefix);
-         SET_Vertex4fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex4fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex4i) {
-         snprintf(symboln, sizeof(symboln), "%sVertex4i", symbol_prefix);
-         SET_Vertex4i(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex4i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4i;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex4iv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex4iv", symbol_prefix);
-         SET_Vertex4iv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex4iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4iv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex4s) {
-         snprintf(symboln, sizeof(symboln), "%sVertex4s", symbol_prefix);
-         SET_Vertex4s(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex4s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4s;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Vertex4sv) {
-         snprintf(symboln, sizeof(symboln), "%sVertex4sv", symbol_prefix);
-         SET_Vertex4sv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertex4sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4sv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClipPlane) {
-         snprintf(symboln, sizeof(symboln), "%sClipPlane", symbol_prefix);
-         SET_ClipPlane(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClipPlane", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClipPlane;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorMaterial) {
-         snprintf(symboln, sizeof(symboln), "%sColorMaterial", symbol_prefix);
-         SET_ColorMaterial(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorMaterial", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorMaterial;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CullFace) {
-         snprintf(symboln, sizeof(symboln), "%sCullFace", symbol_prefix);
-         SET_CullFace(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCullFace", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CullFace;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Fogf) {
-         snprintf(symboln, sizeof(symboln), "%sFogf", symbol_prefix);
-         SET_Fogf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Fogf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Fogfv) {
-         snprintf(symboln, sizeof(symboln), "%sFogfv", symbol_prefix);
-         SET_Fogfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Fogfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Fogi) {
-         snprintf(symboln, sizeof(symboln), "%sFogi", symbol_prefix);
-         SET_Fogi(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogi", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Fogi;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Fogiv) {
-         snprintf(symboln, sizeof(symboln), "%sFogiv", symbol_prefix);
-         SET_Fogiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Fogiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FrontFace) {
-         snprintf(symboln, sizeof(symboln), "%sFrontFace", symbol_prefix);
-         SET_FrontFace(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFrontFace", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FrontFace;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Hint) {
-         snprintf(symboln, sizeof(symboln), "%sHint", symbol_prefix);
-         SET_Hint(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sHint", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Hint;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Lightf) {
-         snprintf(symboln, sizeof(symboln), "%sLightf", symbol_prefix);
-         SET_Lightf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLightf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Lightf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Lightfv) {
-         snprintf(symboln, sizeof(symboln), "%sLightfv", symbol_prefix);
-         SET_Lightfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLightfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Lightfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Lighti) {
-         snprintf(symboln, sizeof(symboln), "%sLighti", symbol_prefix);
-         SET_Lighti(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLighti", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Lighti;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Lightiv) {
-         snprintf(symboln, sizeof(symboln), "%sLightiv", symbol_prefix);
-         SET_Lightiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLightiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Lightiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LightModelf) {
-         snprintf(symboln, sizeof(symboln), "%sLightModelf", symbol_prefix);
-         SET_LightModelf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLightModelf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LightModelf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LightModelfv) {
-         snprintf(symboln, sizeof(symboln), "%sLightModelfv", symbol_prefix);
-         SET_LightModelfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLightModelfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LightModelfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LightModeli) {
-         snprintf(symboln, sizeof(symboln), "%sLightModeli", symbol_prefix);
-         SET_LightModeli(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLightModeli", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LightModeli;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LightModeliv) {
-         snprintf(symboln, sizeof(symboln), "%sLightModeliv", symbol_prefix);
-         SET_LightModeliv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLightModeliv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LightModeliv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LineStipple) {
-         snprintf(symboln, sizeof(symboln), "%sLineStipple", symbol_prefix);
-         SET_LineStipple(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLineStipple", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LineStipple;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LineWidth) {
-         snprintf(symboln, sizeof(symboln), "%sLineWidth", symbol_prefix);
-         SET_LineWidth(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLineWidth", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LineWidth;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Materialf) {
-         snprintf(symboln, sizeof(symboln), "%sMaterialf", symbol_prefix);
-         SET_Materialf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMaterialf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Materialf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Materialfv) {
-         snprintf(symboln, sizeof(symboln), "%sMaterialfv", symbol_prefix);
-         SET_Materialfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMaterialfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Materialfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Materiali) {
-         snprintf(symboln, sizeof(symboln), "%sMateriali", symbol_prefix);
-         SET_Materiali(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMateriali", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Materiali;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Materialiv) {
-         snprintf(symboln, sizeof(symboln), "%sMaterialiv", symbol_prefix);
-         SET_Materialiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMaterialiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Materialiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointSize) {
-         snprintf(symboln, sizeof(symboln), "%sPointSize", symbol_prefix);
-         SET_PointSize(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointSize", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointSize;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PolygonMode) {
-         snprintf(symboln, sizeof(symboln), "%sPolygonMode", symbol_prefix);
-         SET_PolygonMode(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPolygonMode", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PolygonMode;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PolygonStipple) {
-         snprintf(symboln, sizeof(symboln), "%sPolygonStipple", symbol_prefix);
-         SET_PolygonStipple(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPolygonStipple", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PolygonStipple;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Scissor) {
-         snprintf(symboln, sizeof(symboln), "%sScissor", symbol_prefix);
-         SET_Scissor(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sScissor", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Scissor;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ShadeModel) {
-         snprintf(symboln, sizeof(symboln), "%sShadeModel", symbol_prefix);
-         SET_ShadeModel(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sShadeModel", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ShadeModel;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexParameterf) {
-         snprintf(symboln, sizeof(symboln), "%sTexParameterf", symbol_prefix);
-         SET_TexParameterf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexParameterf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sTexParameterfv", symbol_prefix);
-         SET_TexParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexParameteri) {
-         snprintf(symboln, sizeof(symboln), "%sTexParameteri", symbol_prefix);
-         SET_TexParameteri(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexParameteri", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexParameteri;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sTexParameteriv", symbol_prefix);
-         SET_TexParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexImage1D) {
-         snprintf(symboln, sizeof(symboln), "%sTexImage1D", symbol_prefix);
-         SET_TexImage1D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexImage1D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexImage1D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexImage2D) {
-         snprintf(symboln, sizeof(symboln), "%sTexImage2D", symbol_prefix);
-         SET_TexImage2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexImage2D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexImage2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexEnvf) {
-         snprintf(symboln, sizeof(symboln), "%sTexEnvf", symbol_prefix);
-         SET_TexEnvf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexEnvf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexEnvf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexEnvfv) {
-         snprintf(symboln, sizeof(symboln), "%sTexEnvfv", symbol_prefix);
-         SET_TexEnvfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexEnvfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexEnvfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexEnvi) {
-         snprintf(symboln, sizeof(symboln), "%sTexEnvi", symbol_prefix);
-         SET_TexEnvi(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexEnvi", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexEnvi;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexEnviv) {
-         snprintf(symboln, sizeof(symboln), "%sTexEnviv", symbol_prefix);
-         SET_TexEnviv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexEnviv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexEnviv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexGend) {
-         snprintf(symboln, sizeof(symboln), "%sTexGend", symbol_prefix);
-         SET_TexGend(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexGend", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexGend;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexGendv) {
-         snprintf(symboln, sizeof(symboln), "%sTexGendv", symbol_prefix);
-         SET_TexGendv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexGendv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexGendv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexGenf) {
-         snprintf(symboln, sizeof(symboln), "%sTexGenf", symbol_prefix);
-         SET_TexGenf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexGenf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexGenf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexGenfv) {
-         snprintf(symboln, sizeof(symboln), "%sTexGenfv", symbol_prefix);
-         SET_TexGenfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexGenfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexGenfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexGeni) {
-         snprintf(symboln, sizeof(symboln), "%sTexGeni", symbol_prefix);
-         SET_TexGeni(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexGeni", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexGeni;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexGeniv) {
-         snprintf(symboln, sizeof(symboln), "%sTexGeniv", symbol_prefix);
-         SET_TexGeniv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexGeniv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexGeniv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FeedbackBuffer) {
-         snprintf(symboln, sizeof(symboln), "%sFeedbackBuffer", symbol_prefix);
-         SET_FeedbackBuffer(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFeedbackBuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FeedbackBuffer;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SelectBuffer) {
-         snprintf(symboln, sizeof(symboln), "%sSelectBuffer", symbol_prefix);
-         SET_SelectBuffer(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSelectBuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SelectBuffer;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RenderMode) {
-         snprintf(symboln, sizeof(symboln), "%sRenderMode", symbol_prefix);
-         SET_RenderMode(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRenderMode", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RenderMode;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->InitNames) {
-         snprintf(symboln, sizeof(symboln), "%sInitNames", symbol_prefix);
-         SET_InitNames(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sInitNames", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->InitNames;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LoadName) {
-         snprintf(symboln, sizeof(symboln), "%sLoadName", symbol_prefix);
-         SET_LoadName(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLoadName", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LoadName;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PassThrough) {
-         snprintf(symboln, sizeof(symboln), "%sPassThrough", symbol_prefix);
-         SET_PassThrough(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPassThrough", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PassThrough;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PopName) {
-         snprintf(symboln, sizeof(symboln), "%sPopName", symbol_prefix);
-         SET_PopName(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPopName", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PopName;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PushName) {
-         snprintf(symboln, sizeof(symboln), "%sPushName", symbol_prefix);
-         SET_PushName(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPushName", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PushName;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawBuffer) {
-         snprintf(symboln, sizeof(symboln), "%sDrawBuffer", symbol_prefix);
-         SET_DrawBuffer(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawBuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawBuffer;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Clear) {
-         snprintf(symboln, sizeof(symboln), "%sClear", symbol_prefix);
-         SET_Clear(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClear", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Clear;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearAccum) {
-         snprintf(symboln, sizeof(symboln), "%sClearAccum", symbol_prefix);
-         SET_ClearAccum(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearAccum", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearAccum;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearIndex) {
-         snprintf(symboln, sizeof(symboln), "%sClearIndex", symbol_prefix);
-         SET_ClearIndex(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearIndex", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearIndex;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearColor) {
-         snprintf(symboln, sizeof(symboln), "%sClearColor", symbol_prefix);
-         SET_ClearColor(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearColor", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearColor;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearStencil) {
-         snprintf(symboln, sizeof(symboln), "%sClearStencil", symbol_prefix);
-         SET_ClearStencil(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearStencil", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearStencil;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearDepth) {
-         snprintf(symboln, sizeof(symboln), "%sClearDepth", symbol_prefix);
-         SET_ClearDepth(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearDepth", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearDepth;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->StencilMask) {
-         snprintf(symboln, sizeof(symboln), "%sStencilMask", symbol_prefix);
-         SET_StencilMask(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sStencilMask", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->StencilMask;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorMask) {
-         snprintf(symboln, sizeof(symboln), "%sColorMask", symbol_prefix);
-         SET_ColorMask(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorMask", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorMask;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DepthMask) {
-         snprintf(symboln, sizeof(symboln), "%sDepthMask", symbol_prefix);
-         SET_DepthMask(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDepthMask", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DepthMask;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IndexMask) {
-         snprintf(symboln, sizeof(symboln), "%sIndexMask", symbol_prefix);
-         SET_IndexMask(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexMask", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IndexMask;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Accum) {
-         snprintf(symboln, sizeof(symboln), "%sAccum", symbol_prefix);
-         SET_Accum(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sAccum", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Accum;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Disable) {
-         snprintf(symboln, sizeof(symboln), "%sDisable", symbol_prefix);
-         SET_Disable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDisable", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Disable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Enable) {
-         snprintf(symboln, sizeof(symboln), "%sEnable", symbol_prefix);
-         SET_Enable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEnable", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Enable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Finish) {
-         snprintf(symboln, sizeof(symboln), "%sFinish", symbol_prefix);
-         SET_Finish(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFinish", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Finish;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Flush) {
-         snprintf(symboln, sizeof(symboln), "%sFlush", symbol_prefix);
-         SET_Flush(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFlush", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Flush;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PopAttrib) {
-         snprintf(symboln, sizeof(symboln), "%sPopAttrib", symbol_prefix);
-         SET_PopAttrib(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPopAttrib", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PopAttrib;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PushAttrib) {
-         snprintf(symboln, sizeof(symboln), "%sPushAttrib", symbol_prefix);
-         SET_PushAttrib(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPushAttrib", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PushAttrib;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Map1d) {
-         snprintf(symboln, sizeof(symboln), "%sMap1d", symbol_prefix);
-         SET_Map1d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMap1d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Map1d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Map1f) {
-         snprintf(symboln, sizeof(symboln), "%sMap1f", symbol_prefix);
-         SET_Map1f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMap1f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Map1f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Map2d) {
-         snprintf(symboln, sizeof(symboln), "%sMap2d", symbol_prefix);
-         SET_Map2d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMap2d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Map2d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Map2f) {
-         snprintf(symboln, sizeof(symboln), "%sMap2f", symbol_prefix);
-         SET_Map2f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMap2f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Map2f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MapGrid1d) {
-         snprintf(symboln, sizeof(symboln), "%sMapGrid1d", symbol_prefix);
-         SET_MapGrid1d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMapGrid1d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MapGrid1d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MapGrid1f) {
-         snprintf(symboln, sizeof(symboln), "%sMapGrid1f", symbol_prefix);
-         SET_MapGrid1f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMapGrid1f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MapGrid1f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MapGrid2d) {
-         snprintf(symboln, sizeof(symboln), "%sMapGrid2d", symbol_prefix);
-         SET_MapGrid2d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMapGrid2d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MapGrid2d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MapGrid2f) {
-         snprintf(symboln, sizeof(symboln), "%sMapGrid2f", symbol_prefix);
-         SET_MapGrid2f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMapGrid2f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MapGrid2f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalCoord1d) {
-         snprintf(symboln, sizeof(symboln), "%sEvalCoord1d", symbol_prefix);
-         SET_EvalCoord1d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalCoord1d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord1d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalCoord1dv) {
-         snprintf(symboln, sizeof(symboln), "%sEvalCoord1dv", symbol_prefix);
-         SET_EvalCoord1dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalCoord1dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord1dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalCoord1f) {
-         snprintf(symboln, sizeof(symboln), "%sEvalCoord1f", symbol_prefix);
-         SET_EvalCoord1f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalCoord1f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord1f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalCoord1fv) {
-         snprintf(symboln, sizeof(symboln), "%sEvalCoord1fv", symbol_prefix);
-         SET_EvalCoord1fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalCoord1fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord1fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalCoord2d) {
-         snprintf(symboln, sizeof(symboln), "%sEvalCoord2d", symbol_prefix);
-         SET_EvalCoord2d(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalCoord2d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord2d;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalCoord2dv) {
-         snprintf(symboln, sizeof(symboln), "%sEvalCoord2dv", symbol_prefix);
-         SET_EvalCoord2dv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalCoord2dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord2dv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalCoord2f) {
-         snprintf(symboln, sizeof(symboln), "%sEvalCoord2f", symbol_prefix);
-         SET_EvalCoord2f(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalCoord2f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord2f;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalCoord2fv) {
-         snprintf(symboln, sizeof(symboln), "%sEvalCoord2fv", symbol_prefix);
-         SET_EvalCoord2fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalCoord2fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord2fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalMesh1) {
-         snprintf(symboln, sizeof(symboln), "%sEvalMesh1", symbol_prefix);
-         SET_EvalMesh1(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalMesh1", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalMesh1;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalPoint1) {
-         snprintf(symboln, sizeof(symboln), "%sEvalPoint1", symbol_prefix);
-         SET_EvalPoint1(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalPoint1", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalPoint1;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalMesh2) {
-         snprintf(symboln, sizeof(symboln), "%sEvalMesh2", symbol_prefix);
-         SET_EvalMesh2(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalMesh2", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalMesh2;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EvalPoint2) {
-         snprintf(symboln, sizeof(symboln), "%sEvalPoint2", symbol_prefix);
-         SET_EvalPoint2(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEvalPoint2", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EvalPoint2;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->AlphaFunc) {
-         snprintf(symboln, sizeof(symboln), "%sAlphaFunc", symbol_prefix);
-         SET_AlphaFunc(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sAlphaFunc", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->AlphaFunc;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendFunc) {
-         snprintf(symboln, sizeof(symboln), "%sBlendFunc", symbol_prefix);
-         SET_BlendFunc(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendFunc", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendFunc;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LogicOp) {
-         snprintf(symboln, sizeof(symboln), "%sLogicOp", symbol_prefix);
-         SET_LogicOp(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLogicOp", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LogicOp;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->StencilFunc) {
-         snprintf(symboln, sizeof(symboln), "%sStencilFunc", symbol_prefix);
-         SET_StencilFunc(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sStencilFunc", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->StencilFunc;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->StencilOp) {
-         snprintf(symboln, sizeof(symboln), "%sStencilOp", symbol_prefix);
-         SET_StencilOp(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sStencilOp", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->StencilOp;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DepthFunc) {
-         snprintf(symboln, sizeof(symboln), "%sDepthFunc", symbol_prefix);
-         SET_DepthFunc(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDepthFunc", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DepthFunc;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelZoom) {
-         snprintf(symboln, sizeof(symboln), "%sPixelZoom", symbol_prefix);
-         SET_PixelZoom(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelZoom", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelZoom;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelTransferf) {
-         snprintf(symboln, sizeof(symboln), "%sPixelTransferf", symbol_prefix);
-         SET_PixelTransferf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelTransferf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelTransferf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelTransferi) {
-         snprintf(symboln, sizeof(symboln), "%sPixelTransferi", symbol_prefix);
-         SET_PixelTransferi(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelTransferi", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelTransferi;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelStoref) {
-         snprintf(symboln, sizeof(symboln), "%sPixelStoref", symbol_prefix);
-         SET_PixelStoref(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelStoref", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelStoref;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelStorei) {
-         snprintf(symboln, sizeof(symboln), "%sPixelStorei", symbol_prefix);
-         SET_PixelStorei(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelStorei", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelStorei;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelMapfv) {
-         snprintf(symboln, sizeof(symboln), "%sPixelMapfv", symbol_prefix);
-         SET_PixelMapfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelMapfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelMapfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelMapuiv) {
-         snprintf(symboln, sizeof(symboln), "%sPixelMapuiv", symbol_prefix);
-         SET_PixelMapuiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelMapuiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelMapuiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelMapusv) {
-         snprintf(symboln, sizeof(symboln), "%sPixelMapusv", symbol_prefix);
-         SET_PixelMapusv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelMapusv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelMapusv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ReadBuffer) {
-         snprintf(symboln, sizeof(symboln), "%sReadBuffer", symbol_prefix);
-         SET_ReadBuffer(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sReadBuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ReadBuffer;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyPixels) {
-         snprintf(symboln, sizeof(symboln), "%sCopyPixels", symbol_prefix);
-         SET_CopyPixels(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyPixels", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyPixels;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ReadPixels) {
-         snprintf(symboln, sizeof(symboln), "%sReadPixels", symbol_prefix);
-         SET_ReadPixels(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sReadPixels", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ReadPixels;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawPixels) {
-         snprintf(symboln, sizeof(symboln), "%sDrawPixels", symbol_prefix);
-         SET_DrawPixels(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawPixels", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawPixels;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetBooleanv) {
-         snprintf(symboln, sizeof(symboln), "%sGetBooleanv", symbol_prefix);
-         SET_GetBooleanv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetBooleanv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetBooleanv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetClipPlane) {
-         snprintf(symboln, sizeof(symboln), "%sGetClipPlane", symbol_prefix);
-         SET_GetClipPlane(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetClipPlane", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetClipPlane;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetDoublev) {
-         snprintf(symboln, sizeof(symboln), "%sGetDoublev", symbol_prefix);
-         SET_GetDoublev(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetDoublev", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetDoublev;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetError) {
-         snprintf(symboln, sizeof(symboln), "%sGetError", symbol_prefix);
-         SET_GetError(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetError", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetError;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetFloatv) {
-         snprintf(symboln, sizeof(symboln), "%sGetFloatv", symbol_prefix);
-         SET_GetFloatv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetFloatv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetFloatv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetIntegerv) {
-         snprintf(symboln, sizeof(symboln), "%sGetIntegerv", symbol_prefix);
-         SET_GetIntegerv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetIntegerv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetIntegerv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetLightfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetLightfv", symbol_prefix);
-         SET_GetLightfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetLightfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetLightfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetLightiv) {
-         snprintf(symboln, sizeof(symboln), "%sGetLightiv", symbol_prefix);
-         SET_GetLightiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetLightiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetLightiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetMapdv) {
-         snprintf(symboln, sizeof(symboln), "%sGetMapdv", symbol_prefix);
-         SET_GetMapdv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetMapdv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetMapdv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetMapfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetMapfv", symbol_prefix);
-         SET_GetMapfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetMapfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetMapfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetMapiv) {
-         snprintf(symboln, sizeof(symboln), "%sGetMapiv", symbol_prefix);
-         SET_GetMapiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetMapiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetMapiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetMaterialfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetMaterialfv", symbol_prefix);
-         SET_GetMaterialfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetMaterialfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetMaterialfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetMaterialiv) {
-         snprintf(symboln, sizeof(symboln), "%sGetMaterialiv", symbol_prefix);
-         SET_GetMaterialiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetMaterialiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetMaterialiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetPixelMapfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetPixelMapfv", symbol_prefix);
-         SET_GetPixelMapfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetPixelMapfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetPixelMapfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetPixelMapuiv) {
-         snprintf(symboln, sizeof(symboln), "%sGetPixelMapuiv", symbol_prefix);
-         SET_GetPixelMapuiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetPixelMapuiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetPixelMapuiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetPixelMapusv) {
-         snprintf(symboln, sizeof(symboln), "%sGetPixelMapusv", symbol_prefix);
-         SET_GetPixelMapusv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetPixelMapusv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetPixelMapusv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetPolygonStipple) {
-         snprintf(symboln, sizeof(symboln), "%sGetPolygonStipple", symbol_prefix);
-         SET_GetPolygonStipple(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetPolygonStipple", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetPolygonStipple;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetString) {
-         snprintf(symboln, sizeof(symboln), "%sGetString", symbol_prefix);
-         SET_GetString(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetString", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetString;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexEnvfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexEnvfv", symbol_prefix);
-         SET_GetTexEnvfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexEnvfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexEnvfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexEnviv) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexEnviv", symbol_prefix);
-         SET_GetTexEnviv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexEnviv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexEnviv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexGendv) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexGendv", symbol_prefix);
-         SET_GetTexGendv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexGendv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexGendv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexGenfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexGenfv", symbol_prefix);
-         SET_GetTexGenfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexGenfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexGenfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexGeniv) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexGeniv", symbol_prefix);
-         SET_GetTexGeniv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexGeniv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexGeniv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexImage) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexImage", symbol_prefix);
-         SET_GetTexImage(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexImage", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexImage;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexParameterfv", symbol_prefix);
-         SET_GetTexParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexParameteriv", symbol_prefix);
-         SET_GetTexParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexLevelParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexLevelParameterfv", symbol_prefix);
-         SET_GetTexLevelParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexLevelParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexLevelParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexLevelParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexLevelParameteriv", symbol_prefix);
-         SET_GetTexLevelParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexLevelParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexLevelParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsEnabled) {
-         snprintf(symboln, sizeof(symboln), "%sIsEnabled", symbol_prefix);
-         SET_IsEnabled(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsEnabled", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsEnabled;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsList) {
-         snprintf(symboln, sizeof(symboln), "%sIsList", symbol_prefix);
-         SET_IsList(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsList", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsList;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DepthRange) {
-         snprintf(symboln, sizeof(symboln), "%sDepthRange", symbol_prefix);
-         SET_DepthRange(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDepthRange", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DepthRange;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Frustum) {
-         snprintf(symboln, sizeof(symboln), "%sFrustum", symbol_prefix);
-         SET_Frustum(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFrustum", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Frustum;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LoadIdentity) {
-         snprintf(symboln, sizeof(symboln), "%sLoadIdentity", symbol_prefix);
-         SET_LoadIdentity(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLoadIdentity", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LoadIdentity;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LoadMatrixf) {
-         snprintf(symboln, sizeof(symboln), "%sLoadMatrixf", symbol_prefix);
-         SET_LoadMatrixf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLoadMatrixf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LoadMatrixf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LoadMatrixd) {
-         snprintf(symboln, sizeof(symboln), "%sLoadMatrixd", symbol_prefix);
-         SET_LoadMatrixd(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLoadMatrixd", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LoadMatrixd;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MatrixMode) {
-         snprintf(symboln, sizeof(symboln), "%sMatrixMode", symbol_prefix);
-         SET_MatrixMode(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMatrixMode", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MatrixMode;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultMatrixf) {
-         snprintf(symboln, sizeof(symboln), "%sMultMatrixf", symbol_prefix);
-         SET_MultMatrixf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultMatrixf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultMatrixf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultMatrixd) {
-         snprintf(symboln, sizeof(symboln), "%sMultMatrixd", symbol_prefix);
-         SET_MultMatrixd(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultMatrixd", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultMatrixd;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Ortho) {
-         snprintf(symboln, sizeof(symboln), "%sOrtho", symbol_prefix);
-         SET_Ortho(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sOrtho", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Ortho;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PopMatrix) {
-         snprintf(symboln, sizeof(symboln), "%sPopMatrix", symbol_prefix);
-         SET_PopMatrix(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPopMatrix", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PopMatrix;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PushMatrix) {
-         snprintf(symboln, sizeof(symboln), "%sPushMatrix", symbol_prefix);
-         SET_PushMatrix(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPushMatrix", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PushMatrix;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Rotated) {
-         snprintf(symboln, sizeof(symboln), "%sRotated", symbol_prefix);
-         SET_Rotated(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRotated", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Rotated;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Rotatef) {
-         snprintf(symboln, sizeof(symboln), "%sRotatef", symbol_prefix);
-         SET_Rotatef(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRotatef", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Rotatef;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Scaled) {
-         snprintf(symboln, sizeof(symboln), "%sScaled", symbol_prefix);
-         SET_Scaled(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sScaled", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Scaled;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Scalef) {
-         snprintf(symboln, sizeof(symboln), "%sScalef", symbol_prefix);
-         SET_Scalef(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sScalef", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Scalef;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Translated) {
-         snprintf(symboln, sizeof(symboln), "%sTranslated", symbol_prefix);
-         SET_Translated(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTranslated", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Translated;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Translatef) {
-         snprintf(symboln, sizeof(symboln), "%sTranslatef", symbol_prefix);
-         SET_Translatef(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTranslatef", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Translatef;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Viewport) {
-         snprintf(symboln, sizeof(symboln), "%sViewport", symbol_prefix);
-         SET_Viewport(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sViewport", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Viewport;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ArrayElement) {
-         snprintf(symboln, sizeof(symboln), "%sArrayElement", symbol_prefix);
-         SET_ArrayElement(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sArrayElement", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ArrayElement;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ArrayElement) {
-         snprintf(symboln, sizeof(symboln), "%sArrayElementEXT", symbol_prefix);
-         SET_ArrayElement(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sArrayElementEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ArrayElement;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindTexture) {
-         snprintf(symboln, sizeof(symboln), "%sBindTexture", symbol_prefix);
-         SET_BindTexture(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindTexture", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindTexture;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindTexture) {
-         snprintf(symboln, sizeof(symboln), "%sBindTextureEXT", symbol_prefix);
-         SET_BindTexture(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindTextureEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindTexture;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorPointer) {
-         snprintf(symboln, sizeof(symboln), "%sColorPointer", symbol_prefix);
-         SET_ColorPointer(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorPointer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorPointer;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DisableClientState) {
-         snprintf(symboln, sizeof(symboln), "%sDisableClientState", symbol_prefix);
-         SET_DisableClientState(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDisableClientState", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DisableClientState;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawArrays) {
-         snprintf(symboln, sizeof(symboln), "%sDrawArrays", symbol_prefix);
-         SET_DrawArrays(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawArrays", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawArrays;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawArrays) {
-         snprintf(symboln, sizeof(symboln), "%sDrawArraysEXT", symbol_prefix);
-         SET_DrawArrays(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawArraysEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawArrays;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawElements) {
-         snprintf(symboln, sizeof(symboln), "%sDrawElements", symbol_prefix);
-         SET_DrawElements(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawElements", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawElements;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EdgeFlagPointer) {
-         snprintf(symboln, sizeof(symboln), "%sEdgeFlagPointer", symbol_prefix);
-         SET_EdgeFlagPointer(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEdgeFlagPointer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EdgeFlagPointer;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EnableClientState) {
-         snprintf(symboln, sizeof(symboln), "%sEnableClientState", symbol_prefix);
-         SET_EnableClientState(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEnableClientState", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EnableClientState;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IndexPointer) {
-         snprintf(symboln, sizeof(symboln), "%sIndexPointer", symbol_prefix);
-         SET_IndexPointer(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexPointer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IndexPointer;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Indexub) {
-         snprintf(symboln, sizeof(symboln), "%sIndexub", symbol_prefix);
-         SET_Indexub(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexub", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Indexub;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Indexubv) {
-         snprintf(symboln, sizeof(symboln), "%sIndexubv", symbol_prefix);
-         SET_Indexubv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexubv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Indexubv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->InterleavedArrays) {
-         snprintf(symboln, sizeof(symboln), "%sInterleavedArrays", symbol_prefix);
-         SET_InterleavedArrays(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sInterleavedArrays", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->InterleavedArrays;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->NormalPointer) {
-         snprintf(symboln, sizeof(symboln), "%sNormalPointer", symbol_prefix);
-         SET_NormalPointer(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormalPointer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->NormalPointer;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PolygonOffset) {
-         snprintf(symboln, sizeof(symboln), "%sPolygonOffset", symbol_prefix);
-         SET_PolygonOffset(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPolygonOffset", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PolygonOffset;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoordPointer) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoordPointer", symbol_prefix);
-         SET_TexCoordPointer(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoordPointer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoordPointer;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexPointer) {
-         snprintf(symboln, sizeof(symboln), "%sVertexPointer", symbol_prefix);
-         SET_VertexPointer(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexPointer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexPointer;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->AreTexturesResident) {
-         snprintf(symboln, sizeof(symboln), "%sAreTexturesResident", symbol_prefix);
-         SET_AreTexturesResident(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sAreTexturesResident", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->AreTexturesResident;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->AreTexturesResident) {
-         snprintf(symboln, sizeof(symboln), "%sAreTexturesResidentEXT", symbol_prefix);
-         SET_AreTexturesResident(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sAreTexturesResidentEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->AreTexturesResident;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyTexImage1D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyTexImage1D", symbol_prefix);
-         SET_CopyTexImage1D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyTexImage1D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexImage1D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyTexImage1D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyTexImage1DEXT", symbol_prefix);
-         SET_CopyTexImage1D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyTexImage1DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexImage1D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyTexImage2D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyTexImage2D", symbol_prefix);
-         SET_CopyTexImage2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyTexImage2D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexImage2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyTexImage2D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyTexImage2DEXT", symbol_prefix);
-         SET_CopyTexImage2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyTexImage2DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexImage2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyTexSubImage1D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage1D", symbol_prefix);
-         SET_CopyTexSubImage1D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage1D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage1D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyTexSubImage1D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage1DEXT", symbol_prefix);
-         SET_CopyTexSubImage1D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage1DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage1D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyTexSubImage2D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage2D", symbol_prefix);
-         SET_CopyTexSubImage2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage2D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyTexSubImage2D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage2DEXT", symbol_prefix);
-         SET_CopyTexSubImage2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage2DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteTextures) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteTextures", symbol_prefix);
-         SET_DeleteTextures(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteTextures", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteTextures;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteTextures) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteTexturesEXT", symbol_prefix);
-         SET_DeleteTextures(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteTexturesEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteTextures;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenTextures) {
-         snprintf(symboln, sizeof(symboln), "%sGenTextures", symbol_prefix);
-         SET_GenTextures(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenTextures", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenTextures;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenTextures) {
-         snprintf(symboln, sizeof(symboln), "%sGenTexturesEXT", symbol_prefix);
-         SET_GenTextures(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenTexturesEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenTextures;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetPointerv) {
-         snprintf(symboln, sizeof(symboln), "%sGetPointerv", symbol_prefix);
-         SET_GetPointerv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetPointerv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetPointerv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetPointerv) {
-         snprintf(symboln, sizeof(symboln), "%sGetPointervEXT", symbol_prefix);
-         SET_GetPointerv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetPointervEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetPointerv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsTexture) {
-         snprintf(symboln, sizeof(symboln), "%sIsTexture", symbol_prefix);
-         SET_IsTexture(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsTexture", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsTexture;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsTexture) {
-         snprintf(symboln, sizeof(symboln), "%sIsTextureEXT", symbol_prefix);
-         SET_IsTexture(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsTextureEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsTexture;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PrioritizeTextures) {
-         snprintf(symboln, sizeof(symboln), "%sPrioritizeTextures", symbol_prefix);
-         SET_PrioritizeTextures(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPrioritizeTextures", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PrioritizeTextures;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PrioritizeTextures) {
-         snprintf(symboln, sizeof(symboln), "%sPrioritizeTexturesEXT", symbol_prefix);
-         SET_PrioritizeTextures(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPrioritizeTexturesEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PrioritizeTextures;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexSubImage1D) {
-         snprintf(symboln, sizeof(symboln), "%sTexSubImage1D", symbol_prefix);
-         SET_TexSubImage1D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexSubImage1D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage1D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexSubImage1D) {
-         snprintf(symboln, sizeof(symboln), "%sTexSubImage1DEXT", symbol_prefix);
-         SET_TexSubImage1D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexSubImage1DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage1D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexSubImage2D) {
-         snprintf(symboln, sizeof(symboln), "%sTexSubImage2D", symbol_prefix);
-         SET_TexSubImage2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexSubImage2D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexSubImage2D) {
-         snprintf(symboln, sizeof(symboln), "%sTexSubImage2DEXT", symbol_prefix);
-         SET_TexSubImage2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexSubImage2DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PopClientAttrib) {
-         snprintf(symboln, sizeof(symboln), "%sPopClientAttrib", symbol_prefix);
-         SET_PopClientAttrib(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPopClientAttrib", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PopClientAttrib;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PushClientAttrib) {
-         snprintf(symboln, sizeof(symboln), "%sPushClientAttrib", symbol_prefix);
-         SET_PushClientAttrib(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPushClientAttrib", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PushClientAttrib;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendColor) {
-         snprintf(symboln, sizeof(symboln), "%sBlendColor", symbol_prefix);
-         SET_BlendColor(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendColor", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendColor;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendColor) {
-         snprintf(symboln, sizeof(symboln), "%sBlendColorEXT", symbol_prefix);
-         SET_BlendColor(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendColorEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendColor;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendEquation) {
-         snprintf(symboln, sizeof(symboln), "%sBlendEquation", symbol_prefix);
-         SET_BlendEquation(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendEquation", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquation;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendEquation) {
-         snprintf(symboln, sizeof(symboln), "%sBlendEquationEXT", symbol_prefix);
-         SET_BlendEquation(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendEquationEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquation;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawRangeElements) {
-         snprintf(symboln, sizeof(symboln), "%sDrawRangeElements", symbol_prefix);
-         SET_DrawRangeElements(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawRangeElements", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawRangeElements;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawRangeElements) {
-         snprintf(symboln, sizeof(symboln), "%sDrawRangeElementsEXT", symbol_prefix);
-         SET_DrawRangeElements(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawRangeElementsEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawRangeElements;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorTable) {
-         snprintf(symboln, sizeof(symboln), "%sColorTable", symbol_prefix);
-         SET_ColorTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorTable", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorTable) {
-         snprintf(symboln, sizeof(symboln), "%sColorTableSGI", symbol_prefix);
-         SET_ColorTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorTableSGI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorTable) {
-         snprintf(symboln, sizeof(symboln), "%sColorTableEXT", symbol_prefix);
-         SET_ColorTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorTableEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorTableParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sColorTableParameterfv", symbol_prefix);
-         SET_ColorTableParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorTableParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorTableParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorTableParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sColorTableParameterfvSGI", symbol_prefix);
-         SET_ColorTableParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorTableParameterfvSGI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorTableParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorTableParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sColorTableParameteriv", symbol_prefix);
-         SET_ColorTableParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorTableParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorTableParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorTableParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sColorTableParameterivSGI", symbol_prefix);
-         SET_ColorTableParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorTableParameterivSGI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorTableParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyColorTable) {
-         snprintf(symboln, sizeof(symboln), "%sCopyColorTable", symbol_prefix);
-         SET_CopyColorTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyColorTable", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyColorTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyColorTable) {
-         snprintf(symboln, sizeof(symboln), "%sCopyColorTableSGI", symbol_prefix);
-         SET_CopyColorTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyColorTableSGI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyColorTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetColorTable) {
-         snprintf(symboln, sizeof(symboln), "%sGetColorTable", symbol_prefix);
-         SET_GetColorTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetColorTable", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetColorTable) {
-         snprintf(symboln, sizeof(symboln), "%sGetColorTableSGI", symbol_prefix);
-         SET_GetColorTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetColorTableSGI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetColorTable) {
-         snprintf(symboln, sizeof(symboln), "%sGetColorTableEXT", symbol_prefix);
-         SET_GetColorTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetColorTableEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetColorTableParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfv", symbol_prefix);
-         SET_GetColorTableParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetColorTableParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfvSGI", symbol_prefix);
-         SET_GetColorTableParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfvSGI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetColorTableParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfvEXT", symbol_prefix);
-         SET_GetColorTableParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetColorTableParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetColorTableParameteriv", symbol_prefix);
-         SET_GetColorTableParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetColorTableParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetColorTableParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterivSGI", symbol_prefix);
-         SET_GetColorTableParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterivSGI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetColorTableParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterivEXT", symbol_prefix);
-         SET_GetColorTableParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorSubTable) {
-         snprintf(symboln, sizeof(symboln), "%sColorSubTable", symbol_prefix);
-         SET_ColorSubTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorSubTable", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorSubTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorSubTable) {
-         snprintf(symboln, sizeof(symboln), "%sColorSubTableEXT", symbol_prefix);
-         SET_ColorSubTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorSubTableEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorSubTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyColorSubTable) {
-         snprintf(symboln, sizeof(symboln), "%sCopyColorSubTable", symbol_prefix);
-         SET_CopyColorSubTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyColorSubTable", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyColorSubTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyColorSubTable) {
-         snprintf(symboln, sizeof(symboln), "%sCopyColorSubTableEXT", symbol_prefix);
-         SET_CopyColorSubTable(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyColorSubTableEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyColorSubTable;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionFilter1D) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionFilter1D", symbol_prefix);
-         SET_ConvolutionFilter1D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionFilter1D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionFilter1D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionFilter1D) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionFilter1DEXT", symbol_prefix);
-         SET_ConvolutionFilter1D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionFilter1DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionFilter1D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionFilter2D) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionFilter2D", symbol_prefix);
-         SET_ConvolutionFilter2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionFilter2D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionFilter2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionFilter2D) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionFilter2DEXT", symbol_prefix);
-         SET_ConvolutionFilter2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionFilter2DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionFilter2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionParameterf) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionParameterf", symbol_prefix);
-         SET_ConvolutionParameterf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionParameterf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameterf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionParameterf) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfEXT", symbol_prefix);
-         SET_ConvolutionParameterf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameterf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfv", symbol_prefix);
-         SET_ConvolutionParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfvEXT", symbol_prefix);
-         SET_ConvolutionParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionParameteri) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionParameteri", symbol_prefix);
-         SET_ConvolutionParameteri(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionParameteri", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameteri;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionParameteri) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionParameteriEXT", symbol_prefix);
-         SET_ConvolutionParameteri(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionParameteriEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameteri;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionParameteriv", symbol_prefix);
-         SET_ConvolutionParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ConvolutionParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sConvolutionParameterivEXT", symbol_prefix);
-         SET_ConvolutionParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sConvolutionParameterivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyConvolutionFilter1D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter1D", symbol_prefix);
-         SET_CopyConvolutionFilter1D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter1D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyConvolutionFilter1D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyConvolutionFilter1D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter1DEXT", symbol_prefix);
-         SET_CopyConvolutionFilter1D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter1DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyConvolutionFilter1D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyConvolutionFilter2D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter2D", symbol_prefix);
-         SET_CopyConvolutionFilter2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter2D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyConvolutionFilter2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyConvolutionFilter2D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter2DEXT", symbol_prefix);
-         SET_CopyConvolutionFilter2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter2DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyConvolutionFilter2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetConvolutionFilter) {
-         snprintf(symboln, sizeof(symboln), "%sGetConvolutionFilter", symbol_prefix);
-         SET_GetConvolutionFilter(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetConvolutionFilter", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionFilter;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetConvolutionFilter) {
-         snprintf(symboln, sizeof(symboln), "%sGetConvolutionFilterEXT", symbol_prefix);
-         SET_GetConvolutionFilter(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetConvolutionFilterEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionFilter;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetConvolutionParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterfv", symbol_prefix);
-         SET_GetConvolutionParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetConvolutionParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterfvEXT", symbol_prefix);
-         SET_GetConvolutionParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterfvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetConvolutionParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameteriv", symbol_prefix);
-         SET_GetConvolutionParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetConvolutionParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterivEXT", symbol_prefix);
-         SET_GetConvolutionParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetSeparableFilter) {
-         snprintf(symboln, sizeof(symboln), "%sGetSeparableFilter", symbol_prefix);
-         SET_GetSeparableFilter(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetSeparableFilter", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetSeparableFilter;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetSeparableFilter) {
-         snprintf(symboln, sizeof(symboln), "%sGetSeparableFilterEXT", symbol_prefix);
-         SET_GetSeparableFilter(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetSeparableFilterEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetSeparableFilter;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SeparableFilter2D) {
-         snprintf(symboln, sizeof(symboln), "%sSeparableFilter2D", symbol_prefix);
-         SET_SeparableFilter2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSeparableFilter2D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SeparableFilter2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SeparableFilter2D) {
-         snprintf(symboln, sizeof(symboln), "%sSeparableFilter2DEXT", symbol_prefix);
-         SET_SeparableFilter2D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSeparableFilter2DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SeparableFilter2D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetHistogram) {
-         snprintf(symboln, sizeof(symboln), "%sGetHistogram", symbol_prefix);
-         SET_GetHistogram(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetHistogram", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogram;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetHistogram) {
-         snprintf(symboln, sizeof(symboln), "%sGetHistogramEXT", symbol_prefix);
-         SET_GetHistogram(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetHistogramEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogram;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetHistogramParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterfv", symbol_prefix);
-         SET_GetHistogramParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogramParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetHistogramParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterfvEXT", symbol_prefix);
-         SET_GetHistogramParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterfvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogramParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetHistogramParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetHistogramParameteriv", symbol_prefix);
-         SET_GetHistogramParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetHistogramParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogramParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetHistogramParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterivEXT", symbol_prefix);
-         SET_GetHistogramParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogramParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetMinmax) {
-         snprintf(symboln, sizeof(symboln), "%sGetMinmax", symbol_prefix);
-         SET_GetMinmax(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetMinmax", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmax;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetMinmax) {
-         snprintf(symboln, sizeof(symboln), "%sGetMinmaxEXT", symbol_prefix);
-         SET_GetMinmax(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetMinmaxEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmax;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetMinmaxParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterfv", symbol_prefix);
-         SET_GetMinmaxParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmaxParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetMinmaxParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterfvEXT", symbol_prefix);
-         SET_GetMinmaxParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterfvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmaxParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetMinmaxParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameteriv", symbol_prefix);
-         SET_GetMinmaxParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmaxParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetMinmaxParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterivEXT", symbol_prefix);
-         SET_GetMinmaxParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmaxParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Histogram) {
-         snprintf(symboln, sizeof(symboln), "%sHistogram", symbol_prefix);
-         SET_Histogram(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sHistogram", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Histogram;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Histogram) {
-         snprintf(symboln, sizeof(symboln), "%sHistogramEXT", symbol_prefix);
-         SET_Histogram(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sHistogramEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Histogram;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Minmax) {
-         snprintf(symboln, sizeof(symboln), "%sMinmax", symbol_prefix);
-         SET_Minmax(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMinmax", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Minmax;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Minmax) {
-         snprintf(symboln, sizeof(symboln), "%sMinmaxEXT", symbol_prefix);
-         SET_Minmax(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMinmaxEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Minmax;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ResetHistogram) {
-         snprintf(symboln, sizeof(symboln), "%sResetHistogram", symbol_prefix);
-         SET_ResetHistogram(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sResetHistogram", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ResetHistogram;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ResetHistogram) {
-         snprintf(symboln, sizeof(symboln), "%sResetHistogramEXT", symbol_prefix);
-         SET_ResetHistogram(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sResetHistogramEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ResetHistogram;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ResetMinmax) {
-         snprintf(symboln, sizeof(symboln), "%sResetMinmax", symbol_prefix);
-         SET_ResetMinmax(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sResetMinmax", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ResetMinmax;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ResetMinmax) {
-         snprintf(symboln, sizeof(symboln), "%sResetMinmaxEXT", symbol_prefix);
-         SET_ResetMinmax(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sResetMinmaxEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ResetMinmax;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexImage3D) {
-         snprintf(symboln, sizeof(symboln), "%sTexImage3D", symbol_prefix);
-         SET_TexImage3D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexImage3D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexImage3D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexImage3D) {
-         snprintf(symboln, sizeof(symboln), "%sTexImage3DEXT", symbol_prefix);
-         SET_TexImage3D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexImage3DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexImage3D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexSubImage3D) {
-         snprintf(symboln, sizeof(symboln), "%sTexSubImage3D", symbol_prefix);
-         SET_TexSubImage3D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexSubImage3D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage3D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexSubImage3D) {
-         snprintf(symboln, sizeof(symboln), "%sTexSubImage3DEXT", symbol_prefix);
-         SET_TexSubImage3D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexSubImage3DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage3D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyTexSubImage3D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage3D", symbol_prefix);
-         SET_CopyTexSubImage3D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage3D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage3D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyTexSubImage3D) {
-         snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage3DEXT", symbol_prefix);
-         SET_CopyTexSubImage3D(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage3DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage3D;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ActiveTextureARB) {
-         snprintf(symboln, sizeof(symboln), "%sActiveTexture", symbol_prefix);
-         SET_ActiveTextureARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sActiveTexture", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ActiveTextureARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ActiveTextureARB) {
-         snprintf(symboln, sizeof(symboln), "%sActiveTextureARB", symbol_prefix);
-         SET_ActiveTextureARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sActiveTextureARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ActiveTextureARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClientActiveTextureARB) {
-         snprintf(symboln, sizeof(symboln), "%sClientActiveTexture", symbol_prefix);
-         SET_ClientActiveTextureARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClientActiveTexture", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClientActiveTextureARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClientActiveTextureARB) {
-         snprintf(symboln, sizeof(symboln), "%sClientActiveTextureARB", symbol_prefix);
-         SET_ClientActiveTextureARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClientActiveTextureARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClientActiveTextureARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1dARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1d", symbol_prefix);
-         SET_MultiTexCoord1dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1dARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dARB", symbol_prefix);
-         SET_MultiTexCoord1dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dv", symbol_prefix);
-         SET_MultiTexCoord1dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dvARB", symbol_prefix);
-         SET_MultiTexCoord1dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1fARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1f", symbol_prefix);
-         SET_MultiTexCoord1fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1fARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fARB", symbol_prefix);
-         SET_MultiTexCoord1fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fv", symbol_prefix);
-         SET_MultiTexCoord1fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fvARB", symbol_prefix);
-         SET_MultiTexCoord1fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1iARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1i", symbol_prefix);
-         SET_MultiTexCoord1iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1iARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1iARB", symbol_prefix);
-         SET_MultiTexCoord1iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1iARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1iv", symbol_prefix);
-         SET_MultiTexCoord1ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1ivARB", symbol_prefix);
-         SET_MultiTexCoord1ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1ivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1sARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1s", symbol_prefix);
-         SET_MultiTexCoord1sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1sARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1sARB", symbol_prefix);
-         SET_MultiTexCoord1sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1sARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1svARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1sv", symbol_prefix);
-         SET_MultiTexCoord1svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord1svARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1svARB", symbol_prefix);
-         SET_MultiTexCoord1svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1svARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2dARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2d", symbol_prefix);
-         SET_MultiTexCoord2dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2dARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dARB", symbol_prefix);
-         SET_MultiTexCoord2dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dv", symbol_prefix);
-         SET_MultiTexCoord2dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dvARB", symbol_prefix);
-         SET_MultiTexCoord2dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2fARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2f", symbol_prefix);
-         SET_MultiTexCoord2fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2fARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fARB", symbol_prefix);
-         SET_MultiTexCoord2fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fv", symbol_prefix);
-         SET_MultiTexCoord2fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fvARB", symbol_prefix);
-         SET_MultiTexCoord2fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2iARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2i", symbol_prefix);
-         SET_MultiTexCoord2iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2iARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2iARB", symbol_prefix);
-         SET_MultiTexCoord2iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2iARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2iv", symbol_prefix);
-         SET_MultiTexCoord2ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2ivARB", symbol_prefix);
-         SET_MultiTexCoord2ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2ivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2sARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2s", symbol_prefix);
-         SET_MultiTexCoord2sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2sARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2sARB", symbol_prefix);
-         SET_MultiTexCoord2sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2sARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2svARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2sv", symbol_prefix);
-         SET_MultiTexCoord2svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord2svARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2svARB", symbol_prefix);
-         SET_MultiTexCoord2svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2svARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3dARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3d", symbol_prefix);
-         SET_MultiTexCoord3dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3dARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dARB", symbol_prefix);
-         SET_MultiTexCoord3dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dv", symbol_prefix);
-         SET_MultiTexCoord3dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dvARB", symbol_prefix);
-         SET_MultiTexCoord3dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3fARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3f", symbol_prefix);
-         SET_MultiTexCoord3fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3fARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fARB", symbol_prefix);
-         SET_MultiTexCoord3fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fv", symbol_prefix);
-         SET_MultiTexCoord3fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fvARB", symbol_prefix);
-         SET_MultiTexCoord3fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3iARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3i", symbol_prefix);
-         SET_MultiTexCoord3iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3iARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3iARB", symbol_prefix);
-         SET_MultiTexCoord3iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3iARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3iv", symbol_prefix);
-         SET_MultiTexCoord3ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3ivARB", symbol_prefix);
-         SET_MultiTexCoord3ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3ivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3sARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3s", symbol_prefix);
-         SET_MultiTexCoord3sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3sARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3sARB", symbol_prefix);
-         SET_MultiTexCoord3sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3sARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3svARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3sv", symbol_prefix);
-         SET_MultiTexCoord3svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord3svARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3svARB", symbol_prefix);
-         SET_MultiTexCoord3svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3svARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4dARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4d", symbol_prefix);
-         SET_MultiTexCoord4dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4dARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dARB", symbol_prefix);
-         SET_MultiTexCoord4dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dv", symbol_prefix);
-         SET_MultiTexCoord4dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dvARB", symbol_prefix);
-         SET_MultiTexCoord4dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4fARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4f", symbol_prefix);
-         SET_MultiTexCoord4fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4fARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fARB", symbol_prefix);
-         SET_MultiTexCoord4fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fv", symbol_prefix);
-         SET_MultiTexCoord4fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fvARB", symbol_prefix);
-         SET_MultiTexCoord4fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4iARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4i", symbol_prefix);
-         SET_MultiTexCoord4iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4iARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4iARB", symbol_prefix);
-         SET_MultiTexCoord4iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4iARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4iv", symbol_prefix);
-         SET_MultiTexCoord4ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4ivARB", symbol_prefix);
-         SET_MultiTexCoord4ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4ivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4sARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4s", symbol_prefix);
-         SET_MultiTexCoord4sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4sARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4sARB", symbol_prefix);
-         SET_MultiTexCoord4sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4sARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4svARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4sv", symbol_prefix);
-         SET_MultiTexCoord4svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiTexCoord4svARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4svARB", symbol_prefix);
-         SET_MultiTexCoord4svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4svARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->AttachShader) {
-         snprintf(symboln, sizeof(symboln), "%sAttachShader", symbol_prefix);
-         SET_AttachShader(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sAttachShader", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->AttachShader;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CreateProgram) {
-         snprintf(symboln, sizeof(symboln), "%sCreateProgram", symbol_prefix);
-         SET_CreateProgram(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCreateProgram", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CreateProgram;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CreateShader) {
-         snprintf(symboln, sizeof(symboln), "%sCreateShader", symbol_prefix);
-         SET_CreateShader(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCreateShader", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CreateShader;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteProgram) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteProgram", symbol_prefix);
-         SET_DeleteProgram(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteProgram", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteProgram;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteShader) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteShader", symbol_prefix);
-         SET_DeleteShader(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteShader", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteShader;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DetachShader) {
-         snprintf(symboln, sizeof(symboln), "%sDetachShader", symbol_prefix);
-         SET_DetachShader(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDetachShader", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DetachShader;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetAttachedShaders) {
-         snprintf(symboln, sizeof(symboln), "%sGetAttachedShaders", symbol_prefix);
-         SET_GetAttachedShaders(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetAttachedShaders", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetAttachedShaders;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramInfoLog) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramInfoLog", symbol_prefix);
-         SET_GetProgramInfoLog(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramInfoLog", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramInfoLog;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramiv) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramiv", symbol_prefix);
-         SET_GetProgramiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetShaderInfoLog) {
-         snprintf(symboln, sizeof(symboln), "%sGetShaderInfoLog", symbol_prefix);
-         SET_GetShaderInfoLog(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetShaderInfoLog", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetShaderInfoLog;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetShaderiv) {
-         snprintf(symboln, sizeof(symboln), "%sGetShaderiv", symbol_prefix);
-         SET_GetShaderiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetShaderiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetShaderiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsProgram) {
-         snprintf(symboln, sizeof(symboln), "%sIsProgram", symbol_prefix);
-         SET_IsProgram(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsProgram", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsProgram;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsShader) {
-         snprintf(symboln, sizeof(symboln), "%sIsShader", symbol_prefix);
-         SET_IsShader(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsShader", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsShader;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->StencilFuncSeparate) {
-         snprintf(symboln, sizeof(symboln), "%sStencilFuncSeparate", symbol_prefix);
-         SET_StencilFuncSeparate(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sStencilFuncSeparate", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->StencilFuncSeparate;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->StencilMaskSeparate) {
-         snprintf(symboln, sizeof(symboln), "%sStencilMaskSeparate", symbol_prefix);
-         SET_StencilMaskSeparate(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sStencilMaskSeparate", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->StencilMaskSeparate;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->StencilOpSeparate) {
-         snprintf(symboln, sizeof(symboln), "%sStencilOpSeparate", symbol_prefix);
-         SET_StencilOpSeparate(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sStencilOpSeparate", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->StencilOpSeparate;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->StencilOpSeparate) {
-         snprintf(symboln, sizeof(symboln), "%sStencilOpSeparateATI", symbol_prefix);
-         SET_StencilOpSeparate(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sStencilOpSeparateATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->StencilOpSeparate;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix2x3fv) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix2x3fv", symbol_prefix);
-         SET_UniformMatrix2x3fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix2x3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix2x3fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix2x4fv) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix2x4fv", symbol_prefix);
-         SET_UniformMatrix2x4fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix2x4fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix2x4fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix3x2fv) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix3x2fv", symbol_prefix);
-         SET_UniformMatrix3x2fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix3x2fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix3x2fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix3x4fv) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix3x4fv", symbol_prefix);
-         SET_UniformMatrix3x4fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix3x4fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix3x4fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix4x2fv) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix4x2fv", symbol_prefix);
-         SET_UniformMatrix4x2fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix4x2fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix4x2fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix4x3fv) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix4x3fv", symbol_prefix);
-         SET_UniformMatrix4x3fv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix4x3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix4x3fv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClampColor) {
-         snprintf(symboln, sizeof(symboln), "%sClampColor", symbol_prefix);
-         SET_ClampColor(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClampColor", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClampColor;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearBufferfi) {
-         snprintf(symboln, sizeof(symboln), "%sClearBufferfi", symbol_prefix);
-         SET_ClearBufferfi(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearBufferfi", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearBufferfi;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearBufferfv) {
-         snprintf(symboln, sizeof(symboln), "%sClearBufferfv", symbol_prefix);
-         SET_ClearBufferfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearBufferfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearBufferfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearBufferiv) {
-         snprintf(symboln, sizeof(symboln), "%sClearBufferiv", symbol_prefix);
-         SET_ClearBufferiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearBufferiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearBufferiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearBufferuiv) {
-         snprintf(symboln, sizeof(symboln), "%sClearBufferuiv", symbol_prefix);
-         SET_ClearBufferuiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearBufferuiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearBufferuiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetStringi) {
-         snprintf(symboln, sizeof(symboln), "%sGetStringi", symbol_prefix);
-         SET_GetStringi(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetStringi", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetStringi;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexBuffer) {
-         snprintf(symboln, sizeof(symboln), "%sTexBuffer", symbol_prefix);
-         SET_TexBuffer(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexBuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexBuffer;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferTexture) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferTexture", symbol_prefix);
-         SET_FramebufferTexture(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferTexture", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetBufferParameteri64v) {
-         snprintf(symboln, sizeof(symboln), "%sGetBufferParameteri64v", symbol_prefix);
-         SET_GetBufferParameteri64v(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetBufferParameteri64v", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferParameteri64v;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetInteger64i_v) {
-         snprintf(symboln, sizeof(symboln), "%sGetInteger64i_v", symbol_prefix);
-         SET_GetInteger64i_v(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetInteger64i_v", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetInteger64i_v;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribDivisor) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribDivisor", symbol_prefix);
-         SET_VertexAttribDivisor(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribDivisor", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribDivisor;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LoadTransposeMatrixdARB) {
-         snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixd", symbol_prefix);
-         SET_LoadTransposeMatrixdARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixd", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LoadTransposeMatrixdARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LoadTransposeMatrixdARB) {
-         snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixdARB", symbol_prefix);
-         SET_LoadTransposeMatrixdARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixdARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LoadTransposeMatrixdARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LoadTransposeMatrixfARB) {
-         snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixf", symbol_prefix);
-         SET_LoadTransposeMatrixfARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LoadTransposeMatrixfARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LoadTransposeMatrixfARB) {
-         snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixfARB", symbol_prefix);
-         SET_LoadTransposeMatrixfARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixfARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LoadTransposeMatrixfARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultTransposeMatrixdARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixd", symbol_prefix);
-         SET_MultTransposeMatrixdARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixd", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultTransposeMatrixdARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultTransposeMatrixdARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixdARB", symbol_prefix);
-         SET_MultTransposeMatrixdARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixdARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultTransposeMatrixdARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultTransposeMatrixfARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixf", symbol_prefix);
-         SET_MultTransposeMatrixfARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultTransposeMatrixfARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultTransposeMatrixfARB) {
-         snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixfARB", symbol_prefix);
-         SET_MultTransposeMatrixfARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixfARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultTransposeMatrixfARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SampleCoverageARB) {
-         snprintf(symboln, sizeof(symboln), "%sSampleCoverage", symbol_prefix);
-         SET_SampleCoverageARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSampleCoverage", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SampleCoverageARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SampleCoverageARB) {
-         snprintf(symboln, sizeof(symboln), "%sSampleCoverageARB", symbol_prefix);
-         SET_SampleCoverageARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSampleCoverageARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SampleCoverageARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexImage1DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexImage1D", symbol_prefix);
-         SET_CompressedTexImage1DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexImage1D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage1DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexImage1DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexImage1DARB", symbol_prefix);
-         SET_CompressedTexImage1DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexImage1DARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage1DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexImage2DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexImage2D", symbol_prefix);
-         SET_CompressedTexImage2DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexImage2D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage2DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexImage2DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexImage2DARB", symbol_prefix);
-         SET_CompressedTexImage2DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexImage2DARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage2DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexImage3DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexImage3D", symbol_prefix);
-         SET_CompressedTexImage3DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexImage3D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage3DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexImage3DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexImage3DARB", symbol_prefix);
-         SET_CompressedTexImage3DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexImage3DARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage3DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexSubImage1DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage1D", symbol_prefix);
-         SET_CompressedTexSubImage1DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage1D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage1DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexSubImage1DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage1DARB", symbol_prefix);
-         SET_CompressedTexSubImage1DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage1DARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage1DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexSubImage2DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage2D", symbol_prefix);
-         SET_CompressedTexSubImage2DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage2D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage2DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexSubImage2DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage2DARB", symbol_prefix);
-         SET_CompressedTexSubImage2DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage2DARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage2DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexSubImage3DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage3D", symbol_prefix);
-         SET_CompressedTexSubImage3DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage3D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage3DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompressedTexSubImage3DARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage3DARB", symbol_prefix);
-         SET_CompressedTexSubImage3DARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage3DARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage3DARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetCompressedTexImageARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetCompressedTexImage", symbol_prefix);
-         SET_GetCompressedTexImageARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetCompressedTexImage", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetCompressedTexImageARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetCompressedTexImageARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetCompressedTexImageARB", symbol_prefix);
-         SET_GetCompressedTexImageARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetCompressedTexImageARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetCompressedTexImageARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DisableVertexAttribArrayARB) {
-         snprintf(symboln, sizeof(symboln), "%sDisableVertexAttribArray", symbol_prefix);
-         SET_DisableVertexAttribArrayARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDisableVertexAttribArray", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DisableVertexAttribArrayARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DisableVertexAttribArrayARB) {
-         snprintf(symboln, sizeof(symboln), "%sDisableVertexAttribArrayARB", symbol_prefix);
-         SET_DisableVertexAttribArrayARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDisableVertexAttribArrayARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DisableVertexAttribArrayARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EnableVertexAttribArrayARB) {
-         snprintf(symboln, sizeof(symboln), "%sEnableVertexAttribArray", symbol_prefix);
-         SET_EnableVertexAttribArrayARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEnableVertexAttribArray", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EnableVertexAttribArrayARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EnableVertexAttribArrayARB) {
-         snprintf(symboln, sizeof(symboln), "%sEnableVertexAttribArrayARB", symbol_prefix);
-         SET_EnableVertexAttribArrayARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEnableVertexAttribArrayARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EnableVertexAttribArrayARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramEnvParameterdvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramEnvParameterdvARB", symbol_prefix);
-         SET_GetProgramEnvParameterdvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramEnvParameterdvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramEnvParameterdvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramEnvParameterfvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramEnvParameterfvARB", symbol_prefix);
-         SET_GetProgramEnvParameterfvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramEnvParameterfvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramEnvParameterfvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramLocalParameterdvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramLocalParameterdvARB", symbol_prefix);
-         SET_GetProgramLocalParameterdvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramLocalParameterdvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramLocalParameterdvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramLocalParameterfvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramLocalParameterfvARB", symbol_prefix);
-         SET_GetProgramLocalParameterfvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramLocalParameterfvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramLocalParameterfvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramStringARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramStringARB", symbol_prefix);
-         SET_GetProgramStringARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramStringARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramStringARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramivARB", symbol_prefix);
-         SET_GetProgramivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribdvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdv", symbol_prefix);
-         SET_GetVertexAttribdvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribdvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribdvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdvARB", symbol_prefix);
-         SET_GetVertexAttribdvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribdvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribfvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfv", symbol_prefix);
-         SET_GetVertexAttribfvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribfvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribfvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfvARB", symbol_prefix);
-         SET_GetVertexAttribfvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribfvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribiv", symbol_prefix);
-         SET_GetVertexAttribivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribivARB", symbol_prefix);
-         SET_GetVertexAttribivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramEnvParameter4dARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4dARB", symbol_prefix);
-         SET_ProgramEnvParameter4dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramEnvParameter4dARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramParameter4dNV", symbol_prefix);
-         SET_ProgramEnvParameter4dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramParameter4dNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramEnvParameter4dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4dvARB", symbol_prefix);
-         SET_ProgramEnvParameter4dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramEnvParameter4dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramParameter4dvNV", symbol_prefix);
-         SET_ProgramEnvParameter4dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramParameter4dvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramEnvParameter4fARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4fARB", symbol_prefix);
-         SET_ProgramEnvParameter4fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramEnvParameter4fARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramParameter4fNV", symbol_prefix);
-         SET_ProgramEnvParameter4fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramParameter4fNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramEnvParameter4fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4fvARB", symbol_prefix);
-         SET_ProgramEnvParameter4fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramEnvParameter4fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramParameter4fvNV", symbol_prefix);
-         SET_ProgramEnvParameter4fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramParameter4fvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramLocalParameter4dARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4dARB", symbol_prefix);
-         SET_ProgramLocalParameter4dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramLocalParameter4dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramLocalParameter4dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4dvARB", symbol_prefix);
-         SET_ProgramLocalParameter4dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramLocalParameter4dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramLocalParameter4fARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4fARB", symbol_prefix);
-         SET_ProgramLocalParameter4fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramLocalParameter4fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramLocalParameter4fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4fvARB", symbol_prefix);
-         SET_ProgramLocalParameter4fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramLocalParameter4fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramStringARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramStringARB", symbol_prefix);
-         SET_ProgramStringARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramStringARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramStringARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1dARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1d", symbol_prefix);
-         SET_VertexAttrib1dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1dARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dARB", symbol_prefix);
-         SET_VertexAttrib1dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dv", symbol_prefix);
-         SET_VertexAttrib1dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dvARB", symbol_prefix);
-         SET_VertexAttrib1dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1fARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1f", symbol_prefix);
-         SET_VertexAttrib1fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1fARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fARB", symbol_prefix);
-         SET_VertexAttrib1fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fv", symbol_prefix);
-         SET_VertexAttrib1fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fvARB", symbol_prefix);
-         SET_VertexAttrib1fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1sARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1s", symbol_prefix);
-         SET_VertexAttrib1sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1sARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sARB", symbol_prefix);
-         SET_VertexAttrib1sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1svARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sv", symbol_prefix);
-         SET_VertexAttrib1svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1svARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1svARB", symbol_prefix);
-         SET_VertexAttrib1svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1svARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2dARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2d", symbol_prefix);
-         SET_VertexAttrib2dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2dARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dARB", symbol_prefix);
-         SET_VertexAttrib2dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dv", symbol_prefix);
-         SET_VertexAttrib2dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dvARB", symbol_prefix);
-         SET_VertexAttrib2dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2fARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2f", symbol_prefix);
-         SET_VertexAttrib2fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2fARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fARB", symbol_prefix);
-         SET_VertexAttrib2fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fv", symbol_prefix);
-         SET_VertexAttrib2fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fvARB", symbol_prefix);
-         SET_VertexAttrib2fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2sARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2s", symbol_prefix);
-         SET_VertexAttrib2sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2sARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sARB", symbol_prefix);
-         SET_VertexAttrib2sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2svARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sv", symbol_prefix);
-         SET_VertexAttrib2svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2svARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2svARB", symbol_prefix);
-         SET_VertexAttrib2svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2svARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3dARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3d", symbol_prefix);
-         SET_VertexAttrib3dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3dARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dARB", symbol_prefix);
-         SET_VertexAttrib3dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dv", symbol_prefix);
-         SET_VertexAttrib3dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dvARB", symbol_prefix);
-         SET_VertexAttrib3dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3fARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3f", symbol_prefix);
-         SET_VertexAttrib3fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3fARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fARB", symbol_prefix);
-         SET_VertexAttrib3fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fv", symbol_prefix);
-         SET_VertexAttrib3fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fvARB", symbol_prefix);
-         SET_VertexAttrib3fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3sARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3s", symbol_prefix);
-         SET_VertexAttrib3sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3sARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sARB", symbol_prefix);
-         SET_VertexAttrib3sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3svARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sv", symbol_prefix);
-         SET_VertexAttrib3svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3svARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3svARB", symbol_prefix);
-         SET_VertexAttrib3svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3svARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NbvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nbv", symbol_prefix);
-         SET_VertexAttrib4NbvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nbv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NbvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NbvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NbvARB", symbol_prefix);
-         SET_VertexAttrib4NbvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NbvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NbvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NivARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Niv", symbol_prefix);
-         SET_VertexAttrib4NivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Niv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NivARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NivARB", symbol_prefix);
-         SET_VertexAttrib4NivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NsvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nsv", symbol_prefix);
-         SET_VertexAttrib4NsvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nsv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NsvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NsvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NsvARB", symbol_prefix);
-         SET_VertexAttrib4NsvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NsvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NsvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NubARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nub", symbol_prefix);
-         SET_VertexAttrib4NubARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nub", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NubARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NubARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NubARB", symbol_prefix);
-         SET_VertexAttrib4NubARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NubARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NubARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NubvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nubv", symbol_prefix);
-         SET_VertexAttrib4NubvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nubv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NubvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NubvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NubvARB", symbol_prefix);
-         SET_VertexAttrib4NubvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NubvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NubvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NuivARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nuiv", symbol_prefix);
-         SET_VertexAttrib4NuivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nuiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NuivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NuivARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NuivARB", symbol_prefix);
-         SET_VertexAttrib4NuivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NuivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NuivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NusvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nusv", symbol_prefix);
-         SET_VertexAttrib4NusvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nusv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NusvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4NusvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NusvARB", symbol_prefix);
-         SET_VertexAttrib4NusvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NusvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NusvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4bvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4bv", symbol_prefix);
-         SET_VertexAttrib4bvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4bv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4bvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4bvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4bvARB", symbol_prefix);
-         SET_VertexAttrib4bvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4bvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4bvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4dARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4d", symbol_prefix);
-         SET_VertexAttrib4dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4dARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dARB", symbol_prefix);
-         SET_VertexAttrib4dARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dv", symbol_prefix);
-         SET_VertexAttrib4dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4dvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dvARB", symbol_prefix);
-         SET_VertexAttrib4dvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4fARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4f", symbol_prefix);
-         SET_VertexAttrib4fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4fARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fARB", symbol_prefix);
-         SET_VertexAttrib4fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fv", symbol_prefix);
-         SET_VertexAttrib4fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fvARB", symbol_prefix);
-         SET_VertexAttrib4fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4iv", symbol_prefix);
-         SET_VertexAttrib4ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ivARB", symbol_prefix);
-         SET_VertexAttrib4ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4sARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4s", symbol_prefix);
-         SET_VertexAttrib4sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4sARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sARB", symbol_prefix);
-         SET_VertexAttrib4sARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4sARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4svARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sv", symbol_prefix);
-         SET_VertexAttrib4svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4svARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4svARB", symbol_prefix);
-         SET_VertexAttrib4svARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4svARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4svARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4ubvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubv", symbol_prefix);
-         SET_VertexAttrib4ubvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ubvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4ubvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubvARB", symbol_prefix);
-         SET_VertexAttrib4ubvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ubvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4uivARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4uiv", symbol_prefix);
-         SET_VertexAttrib4uivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4uivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4uivARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4uivARB", symbol_prefix);
-         SET_VertexAttrib4uivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4uivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4uivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4usvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4usv", symbol_prefix);
-         SET_VertexAttrib4usvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4usv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4usvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4usvARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4usvARB", symbol_prefix);
-         SET_VertexAttrib4usvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4usvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4usvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribPointerARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribPointer", symbol_prefix);
-         SET_VertexAttribPointerARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribPointer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribPointerARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribPointerARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribPointerARB", symbol_prefix);
-         SET_VertexAttribPointerARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribPointerARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribPointerARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindBufferARB) {
-         snprintf(symboln, sizeof(symboln), "%sBindBuffer", symbol_prefix);
-         SET_BindBufferARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindBuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindBufferARB) {
-         snprintf(symboln, sizeof(symboln), "%sBindBufferARB", symbol_prefix);
-         SET_BindBufferARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindBufferARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BufferDataARB) {
-         snprintf(symboln, sizeof(symboln), "%sBufferData", symbol_prefix);
-         SET_BufferDataARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBufferData", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BufferDataARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BufferDataARB) {
-         snprintf(symboln, sizeof(symboln), "%sBufferDataARB", symbol_prefix);
-         SET_BufferDataARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBufferDataARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BufferDataARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BufferSubDataARB) {
-         snprintf(symboln, sizeof(symboln), "%sBufferSubData", symbol_prefix);
-         SET_BufferSubDataARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBufferSubData", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BufferSubDataARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BufferSubDataARB) {
-         snprintf(symboln, sizeof(symboln), "%sBufferSubDataARB", symbol_prefix);
-         SET_BufferSubDataARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBufferSubDataARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BufferSubDataARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteBuffersARB) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteBuffers", symbol_prefix);
-         SET_DeleteBuffersARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteBuffers", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteBuffersARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteBuffersARB) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteBuffersARB", symbol_prefix);
-         SET_DeleteBuffersARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteBuffersARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteBuffersARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenBuffersARB) {
-         snprintf(symboln, sizeof(symboln), "%sGenBuffers", symbol_prefix);
-         SET_GenBuffersARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenBuffers", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenBuffersARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenBuffersARB) {
-         snprintf(symboln, sizeof(symboln), "%sGenBuffersARB", symbol_prefix);
-         SET_GenBuffersARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenBuffersARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenBuffersARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetBufferParameterivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetBufferParameteriv", symbol_prefix);
-         SET_GetBufferParameterivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetBufferParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferParameterivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetBufferParameterivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetBufferParameterivARB", symbol_prefix);
-         SET_GetBufferParameterivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetBufferParameterivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferParameterivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetBufferPointervARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetBufferPointerv", symbol_prefix);
-         SET_GetBufferPointervARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetBufferPointerv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferPointervARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetBufferPointervARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetBufferPointervARB", symbol_prefix);
-         SET_GetBufferPointervARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetBufferPointervARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferPointervARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetBufferSubDataARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetBufferSubData", symbol_prefix);
-         SET_GetBufferSubDataARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetBufferSubData", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferSubDataARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetBufferSubDataARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetBufferSubDataARB", symbol_prefix);
-         SET_GetBufferSubDataARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetBufferSubDataARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferSubDataARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsBufferARB) {
-         snprintf(symboln, sizeof(symboln), "%sIsBuffer", symbol_prefix);
-         SET_IsBufferARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsBuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsBufferARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsBufferARB) {
-         snprintf(symboln, sizeof(symboln), "%sIsBufferARB", symbol_prefix);
-         SET_IsBufferARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsBufferARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsBufferARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MapBufferARB) {
-         snprintf(symboln, sizeof(symboln), "%sMapBuffer", symbol_prefix);
-         SET_MapBufferARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMapBuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MapBufferARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MapBufferARB) {
-         snprintf(symboln, sizeof(symboln), "%sMapBufferARB", symbol_prefix);
-         SET_MapBufferARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMapBufferARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MapBufferARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UnmapBufferARB) {
-         snprintf(symboln, sizeof(symboln), "%sUnmapBuffer", symbol_prefix);
-         SET_UnmapBufferARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUnmapBuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UnmapBufferARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UnmapBufferARB) {
-         snprintf(symboln, sizeof(symboln), "%sUnmapBufferARB", symbol_prefix);
-         SET_UnmapBufferARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUnmapBufferARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UnmapBufferARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BeginQueryARB) {
-         snprintf(symboln, sizeof(symboln), "%sBeginQuery", symbol_prefix);
-         SET_BeginQueryARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBeginQuery", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BeginQueryARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BeginQueryARB) {
-         snprintf(symboln, sizeof(symboln), "%sBeginQueryARB", symbol_prefix);
-         SET_BeginQueryARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBeginQueryARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BeginQueryARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteQueriesARB) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteQueries", symbol_prefix);
-         SET_DeleteQueriesARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteQueries", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteQueriesARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteQueriesARB) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteQueriesARB", symbol_prefix);
-         SET_DeleteQueriesARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteQueriesARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteQueriesARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EndQueryARB) {
-         snprintf(symboln, sizeof(symboln), "%sEndQuery", symbol_prefix);
-         SET_EndQueryARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEndQuery", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EndQueryARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EndQueryARB) {
-         snprintf(symboln, sizeof(symboln), "%sEndQueryARB", symbol_prefix);
-         SET_EndQueryARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEndQueryARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EndQueryARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenQueriesARB) {
-         snprintf(symboln, sizeof(symboln), "%sGenQueries", symbol_prefix);
-         SET_GenQueriesARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenQueries", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenQueriesARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenQueriesARB) {
-         snprintf(symboln, sizeof(symboln), "%sGenQueriesARB", symbol_prefix);
-         SET_GenQueriesARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenQueriesARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenQueriesARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetQueryObjectivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetQueryObjectiv", symbol_prefix);
-         SET_GetQueryObjectivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetQueryObjectiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjectivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetQueryObjectivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetQueryObjectivARB", symbol_prefix);
-         SET_GetQueryObjectivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetQueryObjectivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjectivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetQueryObjectuivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetQueryObjectuiv", symbol_prefix);
-         SET_GetQueryObjectuivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetQueryObjectuiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjectuivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetQueryObjectuivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetQueryObjectuivARB", symbol_prefix);
-         SET_GetQueryObjectuivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetQueryObjectuivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjectuivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetQueryivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetQueryiv", symbol_prefix);
-         SET_GetQueryivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetQueryiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetQueryivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetQueryivARB", symbol_prefix);
-         SET_GetQueryivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetQueryivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsQueryARB) {
-         snprintf(symboln, sizeof(symboln), "%sIsQuery", symbol_prefix);
-         SET_IsQueryARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsQuery", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsQueryARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsQueryARB) {
-         snprintf(symboln, sizeof(symboln), "%sIsQueryARB", symbol_prefix);
-         SET_IsQueryARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsQueryARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsQueryARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->AttachObjectARB) {
-         snprintf(symboln, sizeof(symboln), "%sAttachObjectARB", symbol_prefix);
-         SET_AttachObjectARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sAttachObjectARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->AttachObjectARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompileShaderARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompileShader", symbol_prefix);
-         SET_CompileShaderARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompileShader", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompileShaderARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CompileShaderARB) {
-         snprintf(symboln, sizeof(symboln), "%sCompileShaderARB", symbol_prefix);
-         SET_CompileShaderARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCompileShaderARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CompileShaderARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CreateProgramObjectARB) {
-         snprintf(symboln, sizeof(symboln), "%sCreateProgramObjectARB", symbol_prefix);
-         SET_CreateProgramObjectARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCreateProgramObjectARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CreateProgramObjectARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CreateShaderObjectARB) {
-         snprintf(symboln, sizeof(symboln), "%sCreateShaderObjectARB", symbol_prefix);
-         SET_CreateShaderObjectARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCreateShaderObjectARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CreateShaderObjectARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteObjectARB) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteObjectARB", symbol_prefix);
-         SET_DeleteObjectARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteObjectARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteObjectARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DetachObjectARB) {
-         snprintf(symboln, sizeof(symboln), "%sDetachObjectARB", symbol_prefix);
-         SET_DetachObjectARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDetachObjectARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DetachObjectARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetActiveUniformARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetActiveUniform", symbol_prefix);
-         SET_GetActiveUniformARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetActiveUniform", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetActiveUniformARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetActiveUniformARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetActiveUniformARB", symbol_prefix);
-         SET_GetActiveUniformARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetActiveUniformARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetActiveUniformARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetAttachedObjectsARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetAttachedObjectsARB", symbol_prefix);
-         SET_GetAttachedObjectsARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetAttachedObjectsARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetAttachedObjectsARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetHandleARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetHandleARB", symbol_prefix);
-         SET_GetHandleARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetHandleARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetHandleARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetInfoLogARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetInfoLogARB", symbol_prefix);
-         SET_GetInfoLogARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetInfoLogARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetInfoLogARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetObjectParameterfvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetObjectParameterfvARB", symbol_prefix);
-         SET_GetObjectParameterfvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetObjectParameterfvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetObjectParameterfvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetObjectParameterivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetObjectParameterivARB", symbol_prefix);
-         SET_GetObjectParameterivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetObjectParameterivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetObjectParameterivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetShaderSourceARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetShaderSource", symbol_prefix);
-         SET_GetShaderSourceARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetShaderSource", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetShaderSourceARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetShaderSourceARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetShaderSourceARB", symbol_prefix);
-         SET_GetShaderSourceARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetShaderSourceARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetShaderSourceARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetUniformLocationARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetUniformLocation", symbol_prefix);
-         SET_GetUniformLocationARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetUniformLocation", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformLocationARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetUniformLocationARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetUniformLocationARB", symbol_prefix);
-         SET_GetUniformLocationARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetUniformLocationARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformLocationARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetUniformfvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetUniformfv", symbol_prefix);
-         SET_GetUniformfvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetUniformfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformfvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetUniformfvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetUniformfvARB", symbol_prefix);
-         SET_GetUniformfvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetUniformfvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformfvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetUniformivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetUniformiv", symbol_prefix);
-         SET_GetUniformivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetUniformiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetUniformivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetUniformivARB", symbol_prefix);
-         SET_GetUniformivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetUniformivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LinkProgramARB) {
-         snprintf(symboln, sizeof(symboln), "%sLinkProgram", symbol_prefix);
-         SET_LinkProgramARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLinkProgram", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LinkProgramARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LinkProgramARB) {
-         snprintf(symboln, sizeof(symboln), "%sLinkProgramARB", symbol_prefix);
-         SET_LinkProgramARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLinkProgramARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LinkProgramARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ShaderSourceARB) {
-         snprintf(symboln, sizeof(symboln), "%sShaderSource", symbol_prefix);
-         SET_ShaderSourceARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sShaderSource", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ShaderSourceARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ShaderSourceARB) {
-         snprintf(symboln, sizeof(symboln), "%sShaderSourceARB", symbol_prefix);
-         SET_ShaderSourceARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sShaderSourceARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ShaderSourceARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1fARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1f", symbol_prefix);
-         SET_Uniform1fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1fARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1fARB", symbol_prefix);
-         SET_Uniform1fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1fv", symbol_prefix);
-         SET_Uniform1fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1fvARB", symbol_prefix);
-         SET_Uniform1fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1iARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1i", symbol_prefix);
-         SET_Uniform1iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1iARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1iARB", symbol_prefix);
-         SET_Uniform1iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1iARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1iv", symbol_prefix);
-         SET_Uniform1ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1ivARB", symbol_prefix);
-         SET_Uniform1ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1ivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2fARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2f", symbol_prefix);
-         SET_Uniform2fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2fARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2fARB", symbol_prefix);
-         SET_Uniform2fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2fv", symbol_prefix);
-         SET_Uniform2fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2fvARB", symbol_prefix);
-         SET_Uniform2fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2iARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2i", symbol_prefix);
-         SET_Uniform2iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2iARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2iARB", symbol_prefix);
-         SET_Uniform2iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2iARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2iv", symbol_prefix);
-         SET_Uniform2ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2ivARB", symbol_prefix);
-         SET_Uniform2ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2ivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3fARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3f", symbol_prefix);
-         SET_Uniform3fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3fARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3fARB", symbol_prefix);
-         SET_Uniform3fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3fv", symbol_prefix);
-         SET_Uniform3fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3fvARB", symbol_prefix);
-         SET_Uniform3fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3iARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3i", symbol_prefix);
-         SET_Uniform3iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3iARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3iARB", symbol_prefix);
-         SET_Uniform3iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3iARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3iv", symbol_prefix);
-         SET_Uniform3ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3ivARB", symbol_prefix);
-         SET_Uniform3ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3ivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4fARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4f", symbol_prefix);
-         SET_Uniform4fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4fARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4fARB", symbol_prefix);
-         SET_Uniform4fARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4fARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4fv", symbol_prefix);
-         SET_Uniform4fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4fvARB", symbol_prefix);
-         SET_Uniform4fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4iARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4i", symbol_prefix);
-         SET_Uniform4iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4iARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4iARB", symbol_prefix);
-         SET_Uniform4iARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4iARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4iARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4iv", symbol_prefix);
-         SET_Uniform4ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4ivARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4ivARB", symbol_prefix);
-         SET_Uniform4ivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4ivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4ivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix2fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix2fv", symbol_prefix);
-         SET_UniformMatrix2fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix2fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix2fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix2fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix2fvARB", symbol_prefix);
-         SET_UniformMatrix2fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix2fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix2fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix3fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix3fv", symbol_prefix);
-         SET_UniformMatrix3fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix3fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix3fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix3fvARB", symbol_prefix);
-         SET_UniformMatrix3fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix3fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix3fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix4fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix4fv", symbol_prefix);
-         SET_UniformMatrix4fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix4fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix4fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UniformMatrix4fvARB) {
-         snprintf(symboln, sizeof(symboln), "%sUniformMatrix4fvARB", symbol_prefix);
-         SET_UniformMatrix4fvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniformMatrix4fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix4fvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UseProgramObjectARB) {
-         snprintf(symboln, sizeof(symboln), "%sUseProgram", symbol_prefix);
-         SET_UseProgramObjectARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUseProgram", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UseProgramObjectARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UseProgramObjectARB) {
-         snprintf(symboln, sizeof(symboln), "%sUseProgramObjectARB", symbol_prefix);
-         SET_UseProgramObjectARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUseProgramObjectARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UseProgramObjectARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ValidateProgramARB) {
-         snprintf(symboln, sizeof(symboln), "%sValidateProgram", symbol_prefix);
-         SET_ValidateProgramARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sValidateProgram", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ValidateProgramARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ValidateProgramARB) {
-         snprintf(symboln, sizeof(symboln), "%sValidateProgramARB", symbol_prefix);
-         SET_ValidateProgramARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sValidateProgramARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ValidateProgramARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindAttribLocationARB) {
-         snprintf(symboln, sizeof(symboln), "%sBindAttribLocation", symbol_prefix);
-         SET_BindAttribLocationARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindAttribLocation", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindAttribLocationARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindAttribLocationARB) {
-         snprintf(symboln, sizeof(symboln), "%sBindAttribLocationARB", symbol_prefix);
-         SET_BindAttribLocationARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindAttribLocationARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindAttribLocationARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetActiveAttribARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetActiveAttrib", symbol_prefix);
-         SET_GetActiveAttribARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetActiveAttrib", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetActiveAttribARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetActiveAttribARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetActiveAttribARB", symbol_prefix);
-         SET_GetActiveAttribARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetActiveAttribARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetActiveAttribARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetAttribLocationARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetAttribLocation", symbol_prefix);
-         SET_GetAttribLocationARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetAttribLocation", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetAttribLocationARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetAttribLocationARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetAttribLocationARB", symbol_prefix);
-         SET_GetAttribLocationARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetAttribLocationARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetAttribLocationARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawBuffersARB) {
-         snprintf(symboln, sizeof(symboln), "%sDrawBuffers", symbol_prefix);
-         SET_DrawBuffersARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawBuffers", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawBuffersARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawBuffersARB) {
-         snprintf(symboln, sizeof(symboln), "%sDrawBuffersARB", symbol_prefix);
-         SET_DrawBuffersARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawBuffersARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawBuffersARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawBuffersARB) {
-         snprintf(symboln, sizeof(symboln), "%sDrawBuffersATI", symbol_prefix);
-         SET_DrawBuffersARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawBuffersATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawBuffersARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClampColorARB) {
-         snprintf(symboln, sizeof(symboln), "%sClampColorARB", symbol_prefix);
-         SET_ClampColorARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClampColorARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClampColorARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawArraysInstancedARB) {
-         snprintf(symboln, sizeof(symboln), "%sDrawArraysInstancedARB", symbol_prefix);
-         SET_DrawArraysInstancedARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawArraysInstancedARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawArraysInstancedARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawArraysInstancedARB) {
-         snprintf(symboln, sizeof(symboln), "%sDrawArraysInstancedEXT", symbol_prefix);
-         SET_DrawArraysInstancedARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawArraysInstancedEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawArraysInstancedARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawArraysInstancedARB) {
-         snprintf(symboln, sizeof(symboln), "%sDrawArraysInstanced", symbol_prefix);
-         SET_DrawArraysInstancedARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawArraysInstanced", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawArraysInstancedARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawElementsInstancedARB) {
-         snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedARB", symbol_prefix);
-         SET_DrawElementsInstancedARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawElementsInstancedARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawElementsInstancedARB) {
-         snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedEXT", symbol_prefix);
-         SET_DrawElementsInstancedARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawElementsInstancedARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawElementsInstancedARB) {
-         snprintf(symboln, sizeof(symboln), "%sDrawElementsInstanced", symbol_prefix);
-         SET_DrawElementsInstancedARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawElementsInstanced", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawElementsInstancedARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RenderbufferStorageMultisample) {
-         snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageMultisample", symbol_prefix);
-         SET_RenderbufferStorageMultisample(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageMultisample", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RenderbufferStorageMultisample;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RenderbufferStorageMultisample) {
-         snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageMultisampleEXT", symbol_prefix);
-         SET_RenderbufferStorageMultisample(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageMultisampleEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RenderbufferStorageMultisample;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferTextureARB) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferTextureARB", symbol_prefix);
-         SET_FramebufferTextureARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferTextureARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTextureARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferTextureFaceARB) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferTextureFaceARB", symbol_prefix);
-         SET_FramebufferTextureFaceARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferTextureFaceARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTextureFaceARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramParameteriARB) {
-         snprintf(symboln, sizeof(symboln), "%sProgramParameteriARB", symbol_prefix);
-         SET_ProgramParameteriARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramParameteriARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramParameteriARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribDivisorARB) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribDivisorARB", symbol_prefix);
-         SET_VertexAttribDivisorARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribDivisorARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribDivisorARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FlushMappedBufferRange) {
-         snprintf(symboln, sizeof(symboln), "%sFlushMappedBufferRange", symbol_prefix);
-         SET_FlushMappedBufferRange(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFlushMappedBufferRange", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FlushMappedBufferRange;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MapBufferRange) {
-         snprintf(symboln, sizeof(symboln), "%sMapBufferRange", symbol_prefix);
-         SET_MapBufferRange(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMapBufferRange", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MapBufferRange;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexBufferARB) {
-         snprintf(symboln, sizeof(symboln), "%sTexBufferARB", symbol_prefix);
-         SET_TexBufferARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexBufferARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexBufferARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindVertexArray) {
-         snprintf(symboln, sizeof(symboln), "%sBindVertexArray", symbol_prefix);
-         SET_BindVertexArray(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindVertexArray", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindVertexArray;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenVertexArrays) {
-         snprintf(symboln, sizeof(symboln), "%sGenVertexArrays", symbol_prefix);
-         SET_GenVertexArrays(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenVertexArrays", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenVertexArrays;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CopyBufferSubData) {
-         snprintf(symboln, sizeof(symboln), "%sCopyBufferSubData", symbol_prefix);
-         SET_CopyBufferSubData(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCopyBufferSubData", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CopyBufferSubData;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClientWaitSync) {
-         snprintf(symboln, sizeof(symboln), "%sClientWaitSync", symbol_prefix);
-         SET_ClientWaitSync(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClientWaitSync", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClientWaitSync;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteSync) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteSync", symbol_prefix);
-         SET_DeleteSync(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteSync", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteSync;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FenceSync) {
-         snprintf(symboln, sizeof(symboln), "%sFenceSync", symbol_prefix);
-         SET_FenceSync(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFenceSync", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FenceSync;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetInteger64v) {
-         snprintf(symboln, sizeof(symboln), "%sGetInteger64v", symbol_prefix);
-         SET_GetInteger64v(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetInteger64v", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetInteger64v;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetSynciv) {
-         snprintf(symboln, sizeof(symboln), "%sGetSynciv", symbol_prefix);
-         SET_GetSynciv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetSynciv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetSynciv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsSync) {
-         snprintf(symboln, sizeof(symboln), "%sIsSync", symbol_prefix);
-         SET_IsSync(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsSync", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsSync;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WaitSync) {
-         snprintf(symboln, sizeof(symboln), "%sWaitSync", symbol_prefix);
-         SET_WaitSync(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWaitSync", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WaitSync;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawElementsBaseVertex) {
-         snprintf(symboln, sizeof(symboln), "%sDrawElementsBaseVertex", symbol_prefix);
-         SET_DrawElementsBaseVertex(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawElementsBaseVertex", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawElementsBaseVertex;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawElementsInstancedBaseVertex) {
-         snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedBaseVertex", symbol_prefix);
-         SET_DrawElementsInstancedBaseVertex(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedBaseVertex", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawElementsInstancedBaseVertex;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawRangeElementsBaseVertex) {
-         snprintf(symboln, sizeof(symboln), "%sDrawRangeElementsBaseVertex", symbol_prefix);
-         SET_DrawRangeElementsBaseVertex(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawRangeElementsBaseVertex", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawRangeElementsBaseVertex;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiDrawElementsBaseVertex) {
-         snprintf(symboln, sizeof(symboln), "%sMultiDrawElementsBaseVertex", symbol_prefix);
-         SET_MultiDrawElementsBaseVertex(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiDrawElementsBaseVertex", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiDrawElementsBaseVertex;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendEquationSeparateiARB) {
-         snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateiARB", symbol_prefix);
-         SET_BlendEquationSeparateiARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateiARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationSeparateiARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendEquationSeparateiARB) {
-         snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateIndexedAMD", symbol_prefix);
-         SET_BlendEquationSeparateiARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateIndexedAMD", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationSeparateiARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendEquationiARB) {
-         snprintf(symboln, sizeof(symboln), "%sBlendEquationiARB", symbol_prefix);
-         SET_BlendEquationiARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendEquationiARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationiARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendEquationiARB) {
-         snprintf(symboln, sizeof(symboln), "%sBlendEquationIndexedAMD", symbol_prefix);
-         SET_BlendEquationiARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendEquationIndexedAMD", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationiARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendFuncSeparateiARB) {
-         snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateiARB", symbol_prefix);
-         SET_BlendFuncSeparateiARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateiARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendFuncSeparateiARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendFuncSeparateiARB) {
-         snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateIndexedAMD", symbol_prefix);
-         SET_BlendFuncSeparateiARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateIndexedAMD", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendFuncSeparateiARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendFunciARB) {
-         snprintf(symboln, sizeof(symboln), "%sBlendFunciARB", symbol_prefix);
-         SET_BlendFunciARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendFunciARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendFunciARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendFunciARB) {
-         snprintf(symboln, sizeof(symboln), "%sBlendFuncIndexedAMD", symbol_prefix);
-         SET_BlendFunciARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendFuncIndexedAMD", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendFunciARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindSampler) {
-         snprintf(symboln, sizeof(symboln), "%sBindSampler", symbol_prefix);
-         SET_BindSampler(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindSampler", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindSampler;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteSamplers) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteSamplers", symbol_prefix);
-         SET_DeleteSamplers(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteSamplers", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteSamplers;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenSamplers) {
-         snprintf(symboln, sizeof(symboln), "%sGenSamplers", symbol_prefix);
-         SET_GenSamplers(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenSamplers", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenSamplers;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetSamplerParameterIiv) {
-         snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterIiv", symbol_prefix);
-         SET_GetSamplerParameterIiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterIiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetSamplerParameterIiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetSamplerParameterIuiv) {
-         snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterIuiv", symbol_prefix);
-         SET_GetSamplerParameterIuiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterIuiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetSamplerParameterIuiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetSamplerParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterfv", symbol_prefix);
-         SET_GetSamplerParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetSamplerParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetSamplerParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sGetSamplerParameteriv", symbol_prefix);
-         SET_GetSamplerParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetSamplerParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetSamplerParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsSampler) {
-         snprintf(symboln, sizeof(symboln), "%sIsSampler", symbol_prefix);
-         SET_IsSampler(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsSampler", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsSampler;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SamplerParameterIiv) {
-         snprintf(symboln, sizeof(symboln), "%sSamplerParameterIiv", symbol_prefix);
-         SET_SamplerParameterIiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSamplerParameterIiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameterIiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SamplerParameterIuiv) {
-         snprintf(symboln, sizeof(symboln), "%sSamplerParameterIuiv", symbol_prefix);
-         SET_SamplerParameterIuiv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSamplerParameterIuiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameterIuiv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SamplerParameterf) {
-         snprintf(symboln, sizeof(symboln), "%sSamplerParameterf", symbol_prefix);
-         SET_SamplerParameterf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSamplerParameterf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameterf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SamplerParameterfv) {
-         snprintf(symboln, sizeof(symboln), "%sSamplerParameterfv", symbol_prefix);
-         SET_SamplerParameterfv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSamplerParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameterfv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SamplerParameteri) {
-         snprintf(symboln, sizeof(symboln), "%sSamplerParameteri", symbol_prefix);
-         SET_SamplerParameteri(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSamplerParameteri", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameteri;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SamplerParameteriv) {
-         snprintf(symboln, sizeof(symboln), "%sSamplerParameteriv", symbol_prefix);
-         SET_SamplerParameteriv(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSamplerParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameteriv;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindTransformFeedback) {
-         snprintf(symboln, sizeof(symboln), "%sBindTransformFeedback", symbol_prefix);
-         SET_BindTransformFeedback(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindTransformFeedback", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindTransformFeedback;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteTransformFeedbacks) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteTransformFeedbacks", symbol_prefix);
-         SET_DeleteTransformFeedbacks(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteTransformFeedbacks", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteTransformFeedbacks;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DrawTransformFeedback) {
-         snprintf(symboln, sizeof(symboln), "%sDrawTransformFeedback", symbol_prefix);
-         SET_DrawTransformFeedback(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDrawTransformFeedback", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DrawTransformFeedback;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenTransformFeedbacks) {
-         snprintf(symboln, sizeof(symboln), "%sGenTransformFeedbacks", symbol_prefix);
-         SET_GenTransformFeedbacks(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenTransformFeedbacks", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenTransformFeedbacks;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsTransformFeedback) {
-         snprintf(symboln, sizeof(symboln), "%sIsTransformFeedback", symbol_prefix);
-         SET_IsTransformFeedback(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsTransformFeedback", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsTransformFeedback;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PauseTransformFeedback) {
-         snprintf(symboln, sizeof(symboln), "%sPauseTransformFeedback", symbol_prefix);
-         SET_PauseTransformFeedback(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPauseTransformFeedback", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PauseTransformFeedback;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ResumeTransformFeedback) {
-         snprintf(symboln, sizeof(symboln), "%sResumeTransformFeedback", symbol_prefix);
-         SET_ResumeTransformFeedback(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sResumeTransformFeedback", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ResumeTransformFeedback;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearDepthf) {
-         snprintf(symboln, sizeof(symboln), "%sClearDepthf", symbol_prefix);
-         SET_ClearDepthf(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearDepthf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearDepthf;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DepthRangef) {
-         snprintf(symboln, sizeof(symboln), "%sDepthRangef", symbol_prefix);
-         SET_DepthRangef(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDepthRangef", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DepthRangef;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetShaderPrecisionFormat) {
-         snprintf(symboln, sizeof(symboln), "%sGetShaderPrecisionFormat", symbol_prefix);
-         SET_GetShaderPrecisionFormat(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetShaderPrecisionFormat", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetShaderPrecisionFormat;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ReleaseShaderCompiler) {
-         snprintf(symboln, sizeof(symboln), "%sReleaseShaderCompiler", symbol_prefix);
-         SET_ReleaseShaderCompiler(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sReleaseShaderCompiler", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ReleaseShaderCompiler;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ShaderBinary) {
-         snprintf(symboln, sizeof(symboln), "%sShaderBinary", symbol_prefix);
-         SET_ShaderBinary(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sShaderBinary", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ShaderBinary;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetGraphicsResetStatusARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetGraphicsResetStatusARB", symbol_prefix);
-         SET_GetGraphicsResetStatusARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetGraphicsResetStatusARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetGraphicsResetStatusARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnColorTableARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnColorTableARB", symbol_prefix);
-         SET_GetnColorTableARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnColorTableARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnColorTableARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnCompressedTexImageARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnCompressedTexImageARB", symbol_prefix);
-         SET_GetnCompressedTexImageARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnCompressedTexImageARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnCompressedTexImageARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnConvolutionFilterARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnConvolutionFilterARB", symbol_prefix);
-         SET_GetnConvolutionFilterARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnConvolutionFilterARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnConvolutionFilterARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnHistogramARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnHistogramARB", symbol_prefix);
-         SET_GetnHistogramARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnHistogramARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnHistogramARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnMapdvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnMapdvARB", symbol_prefix);
-         SET_GetnMapdvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnMapdvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnMapdvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnMapfvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnMapfvARB", symbol_prefix);
-         SET_GetnMapfvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnMapfvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnMapfvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnMapivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnMapivARB", symbol_prefix);
-         SET_GetnMapivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnMapivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnMapivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnMinmaxARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnMinmaxARB", symbol_prefix);
-         SET_GetnMinmaxARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnMinmaxARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnMinmaxARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnPixelMapfvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnPixelMapfvARB", symbol_prefix);
-         SET_GetnPixelMapfvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnPixelMapfvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnPixelMapfvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnPixelMapuivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnPixelMapuivARB", symbol_prefix);
-         SET_GetnPixelMapuivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnPixelMapuivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnPixelMapuivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnPixelMapusvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnPixelMapusvARB", symbol_prefix);
-         SET_GetnPixelMapusvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnPixelMapusvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnPixelMapusvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnPolygonStippleARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnPolygonStippleARB", symbol_prefix);
-         SET_GetnPolygonStippleARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnPolygonStippleARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnPolygonStippleARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnSeparableFilterARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnSeparableFilterARB", symbol_prefix);
-         SET_GetnSeparableFilterARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnSeparableFilterARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnSeparableFilterARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnTexImageARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnTexImageARB", symbol_prefix);
-         SET_GetnTexImageARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnTexImageARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnTexImageARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnUniformdvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnUniformdvARB", symbol_prefix);
-         SET_GetnUniformdvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnUniformdvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnUniformdvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnUniformfvARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnUniformfvARB", symbol_prefix);
-         SET_GetnUniformfvARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnUniformfvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnUniformfvARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnUniformivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnUniformivARB", symbol_prefix);
-         SET_GetnUniformivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnUniformivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnUniformivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetnUniformuivARB) {
-         snprintf(symboln, sizeof(symboln), "%sGetnUniformuivARB", symbol_prefix);
-         SET_GetnUniformuivARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetnUniformuivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetnUniformuivARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ReadnPixelsARB) {
-         snprintf(symboln, sizeof(symboln), "%sReadnPixelsARB", symbol_prefix);
-         SET_ReadnPixelsARB(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sReadnPixelsARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ReadnPixelsARB;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PolygonOffsetEXT) {
-         snprintf(symboln, sizeof(symboln), "%sPolygonOffsetEXT", symbol_prefix);
-         SET_PolygonOffsetEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPolygonOffsetEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PolygonOffsetEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetPixelTexGenParameterfvSGIS) {
-         snprintf(symboln, sizeof(symboln), "%sGetPixelTexGenParameterfvSGIS", symbol_prefix);
-         SET_GetPixelTexGenParameterfvSGIS(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetPixelTexGenParameterfvSGIS", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetPixelTexGenParameterfvSGIS;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetPixelTexGenParameterivSGIS) {
-         snprintf(symboln, sizeof(symboln), "%sGetPixelTexGenParameterivSGIS", symbol_prefix);
-         SET_GetPixelTexGenParameterivSGIS(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetPixelTexGenParameterivSGIS", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetPixelTexGenParameterivSGIS;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelTexGenParameterfSGIS) {
-         snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterfSGIS", symbol_prefix);
-         SET_PixelTexGenParameterfSGIS(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterfSGIS", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelTexGenParameterfSGIS;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelTexGenParameterfvSGIS) {
-         snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterfvSGIS", symbol_prefix);
-         SET_PixelTexGenParameterfvSGIS(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterfvSGIS", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelTexGenParameterfvSGIS;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelTexGenParameteriSGIS) {
-         snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameteriSGIS", symbol_prefix);
-         SET_PixelTexGenParameteriSGIS(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameteriSGIS", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelTexGenParameteriSGIS;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelTexGenParameterivSGIS) {
-         snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterivSGIS", symbol_prefix);
-         SET_PixelTexGenParameterivSGIS(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterivSGIS", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelTexGenParameterivSGIS;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SampleMaskSGIS) {
-         snprintf(symboln, sizeof(symboln), "%sSampleMaskSGIS", symbol_prefix);
-         SET_SampleMaskSGIS(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSampleMaskSGIS", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SampleMaskSGIS;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SampleMaskSGIS) {
-         snprintf(symboln, sizeof(symboln), "%sSampleMaskEXT", symbol_prefix);
-         SET_SampleMaskSGIS(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSampleMaskEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SampleMaskSGIS;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SamplePatternSGIS) {
-         snprintf(symboln, sizeof(symboln), "%sSamplePatternSGIS", symbol_prefix);
-         SET_SamplePatternSGIS(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSamplePatternSGIS", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SamplePatternSGIS;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SamplePatternSGIS) {
-         snprintf(symboln, sizeof(symboln), "%sSamplePatternEXT", symbol_prefix);
-         SET_SamplePatternSGIS(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSamplePatternEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SamplePatternSGIS;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sColorPointerEXT", symbol_prefix);
-         SET_ColorPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorPointerEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EdgeFlagPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sEdgeFlagPointerEXT", symbol_prefix);
-         SET_EdgeFlagPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEdgeFlagPointerEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EdgeFlagPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IndexPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sIndexPointerEXT", symbol_prefix);
-         SET_IndexPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIndexPointerEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IndexPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->NormalPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sNormalPointerEXT", symbol_prefix);
-         SET_NormalPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sNormalPointerEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->NormalPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexCoordPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sTexCoordPointerEXT", symbol_prefix);
-         SET_TexCoordPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexCoordPointerEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexCoordPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexPointerEXT", symbol_prefix);
-         SET_VertexPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexPointerEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameterfEXT) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameterf", symbol_prefix);
-         SET_PointParameterfEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameterf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameterfEXT) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameterfARB", symbol_prefix);
-         SET_PointParameterfEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameterfARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameterfEXT) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameterfEXT", symbol_prefix);
-         SET_PointParameterfEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameterfEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameterfEXT) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameterfSGIS", symbol_prefix);
-         SET_PointParameterfEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameterfSGIS", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameterfvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameterfv", symbol_prefix);
-         SET_PointParameterfvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameterfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameterfvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameterfvARB", symbol_prefix);
-         SET_PointParameterfvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameterfvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameterfvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameterfvEXT", symbol_prefix);
-         SET_PointParameterfvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameterfvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameterfvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameterfvSGIS", symbol_prefix);
-         SET_PointParameterfvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameterfvSGIS", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LockArraysEXT) {
-         snprintf(symboln, sizeof(symboln), "%sLockArraysEXT", symbol_prefix);
-         SET_LockArraysEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLockArraysEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LockArraysEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UnlockArraysEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUnlockArraysEXT", symbol_prefix);
-         SET_UnlockArraysEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUnlockArraysEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UnlockArraysEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3bEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3b", symbol_prefix);
-         SET_SecondaryColor3bEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3b", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3bEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3bEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bEXT", symbol_prefix);
-         SET_SecondaryColor3bEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3bEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3bvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bv", symbol_prefix);
-         SET_SecondaryColor3bvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3bvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3bvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bvEXT", symbol_prefix);
-         SET_SecondaryColor3bvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3bvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3dEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3d", symbol_prefix);
-         SET_SecondaryColor3dEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3dEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3dEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dEXT", symbol_prefix);
-         SET_SecondaryColor3dEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3dEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3dvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dv", symbol_prefix);
-         SET_SecondaryColor3dvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3dvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3dvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dvEXT", symbol_prefix);
-         SET_SecondaryColor3dvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3dvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3fEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3f", symbol_prefix);
-         SET_SecondaryColor3fEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3fEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3fEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fEXT", symbol_prefix);
-         SET_SecondaryColor3fEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3fEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3fvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fv", symbol_prefix);
-         SET_SecondaryColor3fvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3fvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3fvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fvEXT", symbol_prefix);
-         SET_SecondaryColor3fvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3fvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3iEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3i", symbol_prefix);
-         SET_SecondaryColor3iEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3iEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3iEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3iEXT", symbol_prefix);
-         SET_SecondaryColor3iEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3iEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3iEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3ivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3iv", symbol_prefix);
-         SET_SecondaryColor3ivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3ivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ivEXT", symbol_prefix);
-         SET_SecondaryColor3ivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3sEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3s", symbol_prefix);
-         SET_SecondaryColor3sEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3sEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3sEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3sEXT", symbol_prefix);
-         SET_SecondaryColor3sEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3sEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3sEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3svEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3sv", symbol_prefix);
-         SET_SecondaryColor3svEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3svEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3svEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3svEXT", symbol_prefix);
-         SET_SecondaryColor3svEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3svEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3svEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3ubEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ub", symbol_prefix);
-         SET_SecondaryColor3ubEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ub", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ubEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3ubEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubEXT", symbol_prefix);
-         SET_SecondaryColor3ubEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ubEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3ubvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubv", symbol_prefix);
-         SET_SecondaryColor3ubvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ubvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3ubvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubvEXT", symbol_prefix);
-         SET_SecondaryColor3ubvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ubvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ui", symbol_prefix);
-         SET_SecondaryColor3uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ui", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uiEXT", symbol_prefix);
-         SET_SecondaryColor3uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uiEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uiv", symbol_prefix);
-         SET_SecondaryColor3uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uivEXT", symbol_prefix);
-         SET_SecondaryColor3uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3usEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3us", symbol_prefix);
-         SET_SecondaryColor3usEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3us", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3usEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3usEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usEXT", symbol_prefix);
-         SET_SecondaryColor3usEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3usEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3usvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usv", symbol_prefix);
-         SET_SecondaryColor3usvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3usvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColor3usvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usvEXT", symbol_prefix);
-         SET_SecondaryColor3usvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3usvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColorPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColorPointer", symbol_prefix);
-         SET_SecondaryColorPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColorPointer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColorPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SecondaryColorPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sSecondaryColorPointerEXT", symbol_prefix);
-         SET_SecondaryColorPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSecondaryColorPointerEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColorPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiDrawArraysEXT) {
-         snprintf(symboln, sizeof(symboln), "%sMultiDrawArrays", symbol_prefix);
-         SET_MultiDrawArraysEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiDrawArrays", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiDrawArraysEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiDrawArraysEXT) {
-         snprintf(symboln, sizeof(symboln), "%sMultiDrawArraysEXT", symbol_prefix);
-         SET_MultiDrawArraysEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiDrawArraysEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiDrawArraysEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiDrawElementsEXT) {
-         snprintf(symboln, sizeof(symboln), "%sMultiDrawElements", symbol_prefix);
-         SET_MultiDrawElementsEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiDrawElements", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiDrawElementsEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiDrawElementsEXT) {
-         snprintf(symboln, sizeof(symboln), "%sMultiDrawElementsEXT", symbol_prefix);
-         SET_MultiDrawElementsEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiDrawElementsEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiDrawElementsEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FogCoordPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFogCoordPointer", symbol_prefix);
-         SET_FogCoordPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogCoordPointer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FogCoordPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFogCoordPointerEXT", symbol_prefix);
-         SET_FogCoordPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogCoordPointerEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FogCoorddEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFogCoordd", symbol_prefix);
-         SET_FogCoorddEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogCoordd", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FogCoorddEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FogCoorddEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFogCoorddEXT", symbol_prefix);
-         SET_FogCoorddEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogCoorddEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FogCoorddEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FogCoorddvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFogCoorddv", symbol_prefix);
-         SET_FogCoorddvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogCoorddv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FogCoorddvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FogCoorddvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFogCoorddvEXT", symbol_prefix);
-         SET_FogCoorddvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogCoorddvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FogCoorddvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FogCoordfEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFogCoordf", symbol_prefix);
-         SET_FogCoordfEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogCoordf", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordfEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FogCoordfEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFogCoordfEXT", symbol_prefix);
-         SET_FogCoordfEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogCoordfEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordfEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FogCoordfvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFogCoordfv", symbol_prefix);
-         SET_FogCoordfvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogCoordfv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordfvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FogCoordfvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFogCoordfvEXT", symbol_prefix);
-         SET_FogCoordfvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFogCoordfvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordfvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PixelTexGenSGIX) {
-         snprintf(symboln, sizeof(symboln), "%sPixelTexGenSGIX", symbol_prefix);
-         SET_PixelTexGenSGIX(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPixelTexGenSGIX", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PixelTexGenSGIX;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendFuncSeparateEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparate", symbol_prefix);
-         SET_BlendFuncSeparateEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparate", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendFuncSeparateEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendFuncSeparateEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateEXT", symbol_prefix);
-         SET_BlendFuncSeparateEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendFuncSeparateEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendFuncSeparateEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateINGR", symbol_prefix);
-         SET_BlendFuncSeparateEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateINGR", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendFuncSeparateEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FlushVertexArrayRangeNV) {
-         snprintf(symboln, sizeof(symboln), "%sFlushVertexArrayRangeNV", symbol_prefix);
-         SET_FlushVertexArrayRangeNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFlushVertexArrayRangeNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FlushVertexArrayRangeNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexArrayRangeNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexArrayRangeNV", symbol_prefix);
-         SET_VertexArrayRangeNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexArrayRangeNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexArrayRangeNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CombinerInputNV) {
-         snprintf(symboln, sizeof(symboln), "%sCombinerInputNV", symbol_prefix);
-         SET_CombinerInputNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCombinerInputNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CombinerInputNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CombinerOutputNV) {
-         snprintf(symboln, sizeof(symboln), "%sCombinerOutputNV", symbol_prefix);
-         SET_CombinerOutputNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCombinerOutputNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CombinerOutputNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CombinerParameterfNV) {
-         snprintf(symboln, sizeof(symboln), "%sCombinerParameterfNV", symbol_prefix);
-         SET_CombinerParameterfNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCombinerParameterfNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CombinerParameterfNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CombinerParameterfvNV) {
-         snprintf(symboln, sizeof(symboln), "%sCombinerParameterfvNV", symbol_prefix);
-         SET_CombinerParameterfvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCombinerParameterfvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CombinerParameterfvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CombinerParameteriNV) {
-         snprintf(symboln, sizeof(symboln), "%sCombinerParameteriNV", symbol_prefix);
-         SET_CombinerParameteriNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCombinerParameteriNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CombinerParameteriNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CombinerParameterivNV) {
-         snprintf(symboln, sizeof(symboln), "%sCombinerParameterivNV", symbol_prefix);
-         SET_CombinerParameterivNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCombinerParameterivNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CombinerParameterivNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FinalCombinerInputNV) {
-         snprintf(symboln, sizeof(symboln), "%sFinalCombinerInputNV", symbol_prefix);
-         SET_FinalCombinerInputNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFinalCombinerInputNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FinalCombinerInputNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetCombinerInputParameterfvNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetCombinerInputParameterfvNV", symbol_prefix);
-         SET_GetCombinerInputParameterfvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetCombinerInputParameterfvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetCombinerInputParameterfvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetCombinerInputParameterivNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetCombinerInputParameterivNV", symbol_prefix);
-         SET_GetCombinerInputParameterivNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetCombinerInputParameterivNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetCombinerInputParameterivNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetCombinerOutputParameterfvNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetCombinerOutputParameterfvNV", symbol_prefix);
-         SET_GetCombinerOutputParameterfvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetCombinerOutputParameterfvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetCombinerOutputParameterfvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetCombinerOutputParameterivNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetCombinerOutputParameterivNV", symbol_prefix);
-         SET_GetCombinerOutputParameterivNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetCombinerOutputParameterivNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetCombinerOutputParameterivNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetFinalCombinerInputParameterfvNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetFinalCombinerInputParameterfvNV", symbol_prefix);
-         SET_GetFinalCombinerInputParameterfvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetFinalCombinerInputParameterfvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetFinalCombinerInputParameterfvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetFinalCombinerInputParameterivNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetFinalCombinerInputParameterivNV", symbol_prefix);
-         SET_GetFinalCombinerInputParameterivNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetFinalCombinerInputParameterivNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetFinalCombinerInputParameterivNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ResizeBuffersMESA) {
-         snprintf(symboln, sizeof(symboln), "%sResizeBuffersMESA", symbol_prefix);
-         SET_ResizeBuffersMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sResizeBuffersMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ResizeBuffersMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2dMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2d", symbol_prefix);
-         SET_WindowPos2dMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2dMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2dARB", symbol_prefix);
-         SET_WindowPos2dMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2dMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2dMESA", symbol_prefix);
-         SET_WindowPos2dMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2dMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2dvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2dv", symbol_prefix);
-         SET_WindowPos2dvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2dvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2dvARB", symbol_prefix);
-         SET_WindowPos2dvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2dvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2dvMESA", symbol_prefix);
-         SET_WindowPos2dvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2dvMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2fMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2f", symbol_prefix);
-         SET_WindowPos2fMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2fMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2fARB", symbol_prefix);
-         SET_WindowPos2fMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2fMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2fMESA", symbol_prefix);
-         SET_WindowPos2fMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2fMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2fvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2fv", symbol_prefix);
-         SET_WindowPos2fvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2fvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2fvARB", symbol_prefix);
-         SET_WindowPos2fvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2fvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2fvMESA", symbol_prefix);
-         SET_WindowPos2fvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2fvMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2iMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2i", symbol_prefix);
-         SET_WindowPos2iMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2iMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2iMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2iARB", symbol_prefix);
-         SET_WindowPos2iMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2iARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2iMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2iMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2iMESA", symbol_prefix);
-         SET_WindowPos2iMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2iMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2iMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2ivMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2iv", symbol_prefix);
-         SET_WindowPos2ivMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2ivMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2ivMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2ivARB", symbol_prefix);
-         SET_WindowPos2ivMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2ivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2ivMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2ivMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2ivMESA", symbol_prefix);
-         SET_WindowPos2ivMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2ivMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2ivMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2sMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2s", symbol_prefix);
-         SET_WindowPos2sMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2sMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2sMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2sARB", symbol_prefix);
-         SET_WindowPos2sMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2sARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2sMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2sMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2sMESA", symbol_prefix);
-         SET_WindowPos2sMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2sMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2sMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2svMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2sv", symbol_prefix);
-         SET_WindowPos2svMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2svMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2svMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2svARB", symbol_prefix);
-         SET_WindowPos2svMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2svARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2svMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos2svMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos2svMESA", symbol_prefix);
-         SET_WindowPos2svMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos2svMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2svMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3dMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3d", symbol_prefix);
-         SET_WindowPos3dMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3d", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3dMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3dARB", symbol_prefix);
-         SET_WindowPos3dMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3dARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3dMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3dMESA", symbol_prefix);
-         SET_WindowPos3dMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3dMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3dvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3dv", symbol_prefix);
-         SET_WindowPos3dvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3dv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3dvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3dvARB", symbol_prefix);
-         SET_WindowPos3dvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3dvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3dvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3dvMESA", symbol_prefix);
-         SET_WindowPos3dvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3dvMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3fMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3f", symbol_prefix);
-         SET_WindowPos3fMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3f", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3fMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3fARB", symbol_prefix);
-         SET_WindowPos3fMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3fARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3fMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3fMESA", symbol_prefix);
-         SET_WindowPos3fMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3fMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3fvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3fv", symbol_prefix);
-         SET_WindowPos3fvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3fv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3fvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3fvARB", symbol_prefix);
-         SET_WindowPos3fvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3fvARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3fvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3fvMESA", symbol_prefix);
-         SET_WindowPos3fvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3fvMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3iMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3i", symbol_prefix);
-         SET_WindowPos3iMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3iMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3iMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3iARB", symbol_prefix);
-         SET_WindowPos3iMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3iARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3iMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3iMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3iMESA", symbol_prefix);
-         SET_WindowPos3iMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3iMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3iMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3ivMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3iv", symbol_prefix);
-         SET_WindowPos3ivMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3ivMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3ivMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3ivARB", symbol_prefix);
-         SET_WindowPos3ivMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3ivARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3ivMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3ivMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3ivMESA", symbol_prefix);
-         SET_WindowPos3ivMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3ivMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3ivMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3sMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3s", symbol_prefix);
-         SET_WindowPos3sMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3s", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3sMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3sMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3sARB", symbol_prefix);
-         SET_WindowPos3sMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3sARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3sMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3sMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3sMESA", symbol_prefix);
-         SET_WindowPos3sMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3sMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3sMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3svMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3sv", symbol_prefix);
-         SET_WindowPos3svMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3svMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3svMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3svARB", symbol_prefix);
-         SET_WindowPos3svMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3svARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3svMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos3svMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos3svMESA", symbol_prefix);
-         SET_WindowPos3svMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos3svMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3svMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos4dMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos4dMESA", symbol_prefix);
-         SET_WindowPos4dMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos4dMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4dMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos4dvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos4dvMESA", symbol_prefix);
-         SET_WindowPos4dvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos4dvMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4dvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos4fMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos4fMESA", symbol_prefix);
-         SET_WindowPos4fMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos4fMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4fMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos4fvMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos4fvMESA", symbol_prefix);
-         SET_WindowPos4fvMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos4fvMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4fvMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos4iMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos4iMESA", symbol_prefix);
-         SET_WindowPos4iMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos4iMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4iMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos4ivMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos4ivMESA", symbol_prefix);
-         SET_WindowPos4ivMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos4ivMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4ivMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos4sMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos4sMESA", symbol_prefix);
-         SET_WindowPos4sMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos4sMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4sMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->WindowPos4svMESA) {
-         snprintf(symboln, sizeof(symboln), "%sWindowPos4svMESA", symbol_prefix);
-         SET_WindowPos4svMESA(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sWindowPos4svMESA", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4svMESA;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiModeDrawArraysIBM) {
-         snprintf(symboln, sizeof(symboln), "%sMultiModeDrawArraysIBM", symbol_prefix);
-         SET_MultiModeDrawArraysIBM(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiModeDrawArraysIBM", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiModeDrawArraysIBM;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->MultiModeDrawElementsIBM) {
-         snprintf(symboln, sizeof(symboln), "%sMultiModeDrawElementsIBM", symbol_prefix);
-         SET_MultiModeDrawElementsIBM(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sMultiModeDrawElementsIBM", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->MultiModeDrawElementsIBM;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteFencesNV) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteFencesNV", symbol_prefix);
-         SET_DeleteFencesNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteFencesNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteFencesNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FinishFenceNV) {
-         snprintf(symboln, sizeof(symboln), "%sFinishFenceNV", symbol_prefix);
-         SET_FinishFenceNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFinishFenceNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FinishFenceNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenFencesNV) {
-         snprintf(symboln, sizeof(symboln), "%sGenFencesNV", symbol_prefix);
-         SET_GenFencesNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenFencesNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenFencesNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetFenceivNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetFenceivNV", symbol_prefix);
-         SET_GetFenceivNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetFenceivNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetFenceivNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsFenceNV) {
-         snprintf(symboln, sizeof(symboln), "%sIsFenceNV", symbol_prefix);
-         SET_IsFenceNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsFenceNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsFenceNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SetFenceNV) {
-         snprintf(symboln, sizeof(symboln), "%sSetFenceNV", symbol_prefix);
-         SET_SetFenceNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSetFenceNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SetFenceNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TestFenceNV) {
-         snprintf(symboln, sizeof(symboln), "%sTestFenceNV", symbol_prefix);
-         SET_TestFenceNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTestFenceNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TestFenceNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->AreProgramsResidentNV) {
-         snprintf(symboln, sizeof(symboln), "%sAreProgramsResidentNV", symbol_prefix);
-         SET_AreProgramsResidentNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sAreProgramsResidentNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->AreProgramsResidentNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindProgramNV) {
-         snprintf(symboln, sizeof(symboln), "%sBindProgramARB", symbol_prefix);
-         SET_BindProgramNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindProgramARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindProgramNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindProgramNV) {
-         snprintf(symboln, sizeof(symboln), "%sBindProgramNV", symbol_prefix);
-         SET_BindProgramNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindProgramNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindProgramNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteProgramsNV) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteProgramsARB", symbol_prefix);
-         SET_DeleteProgramsNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteProgramsARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteProgramsNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteProgramsNV) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteProgramsNV", symbol_prefix);
-         SET_DeleteProgramsNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteProgramsNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteProgramsNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ExecuteProgramNV) {
-         snprintf(symboln, sizeof(symboln), "%sExecuteProgramNV", symbol_prefix);
-         SET_ExecuteProgramNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sExecuteProgramNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ExecuteProgramNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenProgramsNV) {
-         snprintf(symboln, sizeof(symboln), "%sGenProgramsARB", symbol_prefix);
-         SET_GenProgramsNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenProgramsARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenProgramsNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenProgramsNV) {
-         snprintf(symboln, sizeof(symboln), "%sGenProgramsNV", symbol_prefix);
-         SET_GenProgramsNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenProgramsNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenProgramsNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramParameterdvNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramParameterdvNV", symbol_prefix);
-         SET_GetProgramParameterdvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramParameterdvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramParameterdvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramParameterfvNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramParameterfvNV", symbol_prefix);
-         SET_GetProgramParameterfvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramParameterfvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramParameterfvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramStringNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramStringNV", symbol_prefix);
-         SET_GetProgramStringNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramStringNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramStringNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramivNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramivNV", symbol_prefix);
-         SET_GetProgramivNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramivNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramivNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTrackMatrixivNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetTrackMatrixivNV", symbol_prefix);
-         SET_GetTrackMatrixivNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTrackMatrixivNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTrackMatrixivNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribPointervNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointerv", symbol_prefix);
-         SET_GetVertexAttribPointervNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointerv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribPointervNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribPointervNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointervARB", symbol_prefix);
-         SET_GetVertexAttribPointervNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointervARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribPointervNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribPointervNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointervNV", symbol_prefix);
-         SET_GetVertexAttribPointervNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointervNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribPointervNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribdvNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdvNV", symbol_prefix);
-         SET_GetVertexAttribdvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribdvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribfvNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfvNV", symbol_prefix);
-         SET_GetVertexAttribfvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribfvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribivNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribivNV", symbol_prefix);
-         SET_GetVertexAttribivNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribivNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribivNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsProgramNV) {
-         snprintf(symboln, sizeof(symboln), "%sIsProgramARB", symbol_prefix);
-         SET_IsProgramNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsProgramARB", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsProgramNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsProgramNV) {
-         snprintf(symboln, sizeof(symboln), "%sIsProgramNV", symbol_prefix);
-         SET_IsProgramNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsProgramNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsProgramNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->LoadProgramNV) {
-         snprintf(symboln, sizeof(symboln), "%sLoadProgramNV", symbol_prefix);
-         SET_LoadProgramNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sLoadProgramNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->LoadProgramNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramParameters4dvNV) {
-         snprintf(symboln, sizeof(symboln), "%sProgramParameters4dvNV", symbol_prefix);
-         SET_ProgramParameters4dvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramParameters4dvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramParameters4dvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramParameters4fvNV) {
-         snprintf(symboln, sizeof(symboln), "%sProgramParameters4fvNV", symbol_prefix);
-         SET_ProgramParameters4fvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramParameters4fvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramParameters4fvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RequestResidentProgramsNV) {
-         snprintf(symboln, sizeof(symboln), "%sRequestResidentProgramsNV", symbol_prefix);
-         SET_RequestResidentProgramsNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRequestResidentProgramsNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RequestResidentProgramsNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TrackMatrixNV) {
-         snprintf(symboln, sizeof(symboln), "%sTrackMatrixNV", symbol_prefix);
-         SET_TrackMatrixNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTrackMatrixNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TrackMatrixNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1dNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dNV", symbol_prefix);
-         SET_VertexAttrib1dNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1dvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dvNV", symbol_prefix);
-         SET_VertexAttrib1dvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1fNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fNV", symbol_prefix);
-         SET_VertexAttrib1fNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1fvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fvNV", symbol_prefix);
-         SET_VertexAttrib1fvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1sNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sNV", symbol_prefix);
-         SET_VertexAttrib1sNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1sNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib1svNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib1svNV", symbol_prefix);
-         SET_VertexAttrib1svNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib1svNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1svNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2dNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dNV", symbol_prefix);
-         SET_VertexAttrib2dNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2dvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dvNV", symbol_prefix);
-         SET_VertexAttrib2dvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2fNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fNV", symbol_prefix);
-         SET_VertexAttrib2fNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2fvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fvNV", symbol_prefix);
-         SET_VertexAttrib2fvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2sNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sNV", symbol_prefix);
-         SET_VertexAttrib2sNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2sNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib2svNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib2svNV", symbol_prefix);
-         SET_VertexAttrib2svNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib2svNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2svNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3dNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dNV", symbol_prefix);
-         SET_VertexAttrib3dNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3dvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dvNV", symbol_prefix);
-         SET_VertexAttrib3dvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3fNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fNV", symbol_prefix);
-         SET_VertexAttrib3fNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3fvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fvNV", symbol_prefix);
-         SET_VertexAttrib3fvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3sNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sNV", symbol_prefix);
-         SET_VertexAttrib3sNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3sNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib3svNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib3svNV", symbol_prefix);
-         SET_VertexAttrib3svNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib3svNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3svNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4dNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dNV", symbol_prefix);
-         SET_VertexAttrib4dNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4dvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dvNV", symbol_prefix);
-         SET_VertexAttrib4dvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4fNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fNV", symbol_prefix);
-         SET_VertexAttrib4fNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4fvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fvNV", symbol_prefix);
-         SET_VertexAttrib4fvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4sNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sNV", symbol_prefix);
-         SET_VertexAttrib4sNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4sNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4svNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4svNV", symbol_prefix);
-         SET_VertexAttrib4svNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4svNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4svNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4ubNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubNV", symbol_prefix);
-         SET_VertexAttrib4ubNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ubNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttrib4ubvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubvNV", symbol_prefix);
-         SET_VertexAttrib4ubvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ubvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribPointerNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribPointerNV", symbol_prefix);
-         SET_VertexAttribPointerNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribPointerNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribPointerNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs1dvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs1dvNV", symbol_prefix);
-         SET_VertexAttribs1dvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs1dvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs1dvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs1fvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs1fvNV", symbol_prefix);
-         SET_VertexAttribs1fvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs1fvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs1fvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs1svNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs1svNV", symbol_prefix);
-         SET_VertexAttribs1svNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs1svNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs1svNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs2dvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs2dvNV", symbol_prefix);
-         SET_VertexAttribs2dvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs2dvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs2dvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs2fvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs2fvNV", symbol_prefix);
-         SET_VertexAttribs2fvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs2fvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs2fvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs2svNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs2svNV", symbol_prefix);
-         SET_VertexAttribs2svNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs2svNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs2svNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs3dvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs3dvNV", symbol_prefix);
-         SET_VertexAttribs3dvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs3dvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs3dvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs3fvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs3fvNV", symbol_prefix);
-         SET_VertexAttribs3fvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs3fvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs3fvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs3svNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs3svNV", symbol_prefix);
-         SET_VertexAttribs3svNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs3svNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs3svNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs4dvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs4dvNV", symbol_prefix);
-         SET_VertexAttribs4dvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs4dvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs4dvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs4fvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs4fvNV", symbol_prefix);
-         SET_VertexAttribs4fvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs4fvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs4fvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs4svNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs4svNV", symbol_prefix);
-         SET_VertexAttribs4svNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs4svNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs4svNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribs4ubvNV) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribs4ubvNV", symbol_prefix);
-         SET_VertexAttribs4ubvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribs4ubvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs4ubvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexBumpParameterfvATI) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexBumpParameterfvATI", symbol_prefix);
-         SET_GetTexBumpParameterfvATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexBumpParameterfvATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexBumpParameterfvATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexBumpParameterivATI) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexBumpParameterivATI", symbol_prefix);
-         SET_GetTexBumpParameterivATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexBumpParameterivATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexBumpParameterivATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexBumpParameterfvATI) {
-         snprintf(symboln, sizeof(symboln), "%sTexBumpParameterfvATI", symbol_prefix);
-         SET_TexBumpParameterfvATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexBumpParameterfvATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexBumpParameterfvATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexBumpParameterivATI) {
-         snprintf(symboln, sizeof(symboln), "%sTexBumpParameterivATI", symbol_prefix);
-         SET_TexBumpParameterivATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexBumpParameterivATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexBumpParameterivATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->AlphaFragmentOp1ATI) {
-         snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp1ATI", symbol_prefix);
-         SET_AlphaFragmentOp1ATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp1ATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->AlphaFragmentOp1ATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->AlphaFragmentOp2ATI) {
-         snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp2ATI", symbol_prefix);
-         SET_AlphaFragmentOp2ATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp2ATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->AlphaFragmentOp2ATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->AlphaFragmentOp3ATI) {
-         snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp3ATI", symbol_prefix);
-         SET_AlphaFragmentOp3ATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp3ATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->AlphaFragmentOp3ATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BeginFragmentShaderATI) {
-         snprintf(symboln, sizeof(symboln), "%sBeginFragmentShaderATI", symbol_prefix);
-         SET_BeginFragmentShaderATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBeginFragmentShaderATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BeginFragmentShaderATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindFragmentShaderATI) {
-         snprintf(symboln, sizeof(symboln), "%sBindFragmentShaderATI", symbol_prefix);
-         SET_BindFragmentShaderATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindFragmentShaderATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindFragmentShaderATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorFragmentOp1ATI) {
-         snprintf(symboln, sizeof(symboln), "%sColorFragmentOp1ATI", symbol_prefix);
-         SET_ColorFragmentOp1ATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorFragmentOp1ATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorFragmentOp1ATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorFragmentOp2ATI) {
-         snprintf(symboln, sizeof(symboln), "%sColorFragmentOp2ATI", symbol_prefix);
-         SET_ColorFragmentOp2ATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorFragmentOp2ATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorFragmentOp2ATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorFragmentOp3ATI) {
-         snprintf(symboln, sizeof(symboln), "%sColorFragmentOp3ATI", symbol_prefix);
-         SET_ColorFragmentOp3ATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorFragmentOp3ATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorFragmentOp3ATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteFragmentShaderATI) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteFragmentShaderATI", symbol_prefix);
-         SET_DeleteFragmentShaderATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteFragmentShaderATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteFragmentShaderATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EndFragmentShaderATI) {
-         snprintf(symboln, sizeof(symboln), "%sEndFragmentShaderATI", symbol_prefix);
-         SET_EndFragmentShaderATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEndFragmentShaderATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EndFragmentShaderATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenFragmentShadersATI) {
-         snprintf(symboln, sizeof(symboln), "%sGenFragmentShadersATI", symbol_prefix);
-         SET_GenFragmentShadersATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenFragmentShadersATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenFragmentShadersATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PassTexCoordATI) {
-         snprintf(symboln, sizeof(symboln), "%sPassTexCoordATI", symbol_prefix);
-         SET_PassTexCoordATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPassTexCoordATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PassTexCoordATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SampleMapATI) {
-         snprintf(symboln, sizeof(symboln), "%sSampleMapATI", symbol_prefix);
-         SET_SampleMapATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSampleMapATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SampleMapATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->SetFragmentShaderConstantATI) {
-         snprintf(symboln, sizeof(symboln), "%sSetFragmentShaderConstantATI", symbol_prefix);
-         SET_SetFragmentShaderConstantATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sSetFragmentShaderConstantATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->SetFragmentShaderConstantATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameteriNV) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameteri", symbol_prefix);
-         SET_PointParameteriNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameteri", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameteriNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameteriNV) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameteriNV", symbol_prefix);
-         SET_PointParameteriNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameteriNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameteriNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameterivNV) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameteriv", symbol_prefix);
-         SET_PointParameterivNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterivNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PointParameterivNV) {
-         snprintf(symboln, sizeof(symboln), "%sPointParameterivNV", symbol_prefix);
-         SET_PointParameterivNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPointParameterivNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterivNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ActiveStencilFaceEXT) {
-         snprintf(symboln, sizeof(symboln), "%sActiveStencilFaceEXT", symbol_prefix);
-         SET_ActiveStencilFaceEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sActiveStencilFaceEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ActiveStencilFaceEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindVertexArrayAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sBindVertexArrayAPPLE", symbol_prefix);
-         SET_BindVertexArrayAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindVertexArrayAPPLE", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindVertexArrayAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteVertexArraysAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteVertexArrays", symbol_prefix);
-         SET_DeleteVertexArraysAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteVertexArrays", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteVertexArraysAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteVertexArraysAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteVertexArraysAPPLE", symbol_prefix);
-         SET_DeleteVertexArraysAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteVertexArraysAPPLE", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteVertexArraysAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenVertexArraysAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sGenVertexArraysAPPLE", symbol_prefix);
-         SET_GenVertexArraysAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenVertexArraysAPPLE", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenVertexArraysAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsVertexArrayAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sIsVertexArray", symbol_prefix);
-         SET_IsVertexArrayAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsVertexArray", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsVertexArrayAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsVertexArrayAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sIsVertexArrayAPPLE", symbol_prefix);
-         SET_IsVertexArrayAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsVertexArrayAPPLE", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsVertexArrayAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramNamedParameterdvNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramNamedParameterdvNV", symbol_prefix);
-         SET_GetProgramNamedParameterdvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramNamedParameterdvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramNamedParameterdvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetProgramNamedParameterfvNV) {
-         snprintf(symboln, sizeof(symboln), "%sGetProgramNamedParameterfvNV", symbol_prefix);
-         SET_GetProgramNamedParameterfvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetProgramNamedParameterfvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramNamedParameterfvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramNamedParameter4dNV) {
-         snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4dNV", symbol_prefix);
-         SET_ProgramNamedParameter4dNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4dNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramNamedParameter4dNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramNamedParameter4dvNV) {
-         snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4dvNV", symbol_prefix);
-         SET_ProgramNamedParameter4dvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4dvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramNamedParameter4dvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramNamedParameter4fNV) {
-         snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4fNV", symbol_prefix);
-         SET_ProgramNamedParameter4fNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4fNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramNamedParameter4fNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramNamedParameter4fvNV) {
-         snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4fvNV", symbol_prefix);
-         SET_ProgramNamedParameter4fvNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4fvNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramNamedParameter4fvNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PrimitiveRestartIndexNV) {
-         snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartIndexNV", symbol_prefix);
-         SET_PrimitiveRestartIndexNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartIndexNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PrimitiveRestartIndexNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PrimitiveRestartIndexNV) {
-         snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartIndex", symbol_prefix);
-         SET_PrimitiveRestartIndexNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartIndex", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PrimitiveRestartIndexNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->PrimitiveRestartNV) {
-         snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartNV", symbol_prefix);
-         SET_PrimitiveRestartNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->PrimitiveRestartNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DepthBoundsEXT) {
-         snprintf(symboln, sizeof(symboln), "%sDepthBoundsEXT", symbol_prefix);
-         SET_DepthBoundsEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDepthBoundsEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DepthBoundsEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendEquationSeparateEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparate", symbol_prefix);
-         SET_BlendEquationSeparateEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparate", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationSeparateEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendEquationSeparateEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateEXT", symbol_prefix);
-         SET_BlendEquationSeparateEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationSeparateEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlendEquationSeparateEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateATI", symbol_prefix);
-         SET_BlendEquationSeparateEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationSeparateEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindFramebufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBindFramebuffer", symbol_prefix);
-         SET_BindFramebufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindFramebuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindFramebufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindFramebufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBindFramebufferEXT", symbol_prefix);
-         SET_BindFramebufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindFramebufferEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindFramebufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindRenderbufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBindRenderbuffer", symbol_prefix);
-         SET_BindRenderbufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindRenderbuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindRenderbufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindRenderbufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBindRenderbufferEXT", symbol_prefix);
-         SET_BindRenderbufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindRenderbufferEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindRenderbufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CheckFramebufferStatusEXT) {
-         snprintf(symboln, sizeof(symboln), "%sCheckFramebufferStatus", symbol_prefix);
-         SET_CheckFramebufferStatusEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCheckFramebufferStatus", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CheckFramebufferStatusEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CheckFramebufferStatusEXT) {
-         snprintf(symboln, sizeof(symboln), "%sCheckFramebufferStatusEXT", symbol_prefix);
-         SET_CheckFramebufferStatusEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCheckFramebufferStatusEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CheckFramebufferStatusEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteFramebuffersEXT) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteFramebuffers", symbol_prefix);
-         SET_DeleteFramebuffersEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteFramebuffers", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteFramebuffersEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteFramebuffersEXT) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteFramebuffersEXT", symbol_prefix);
-         SET_DeleteFramebuffersEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteFramebuffersEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteFramebuffersEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteRenderbuffersEXT) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteRenderbuffers", symbol_prefix);
-         SET_DeleteRenderbuffersEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteRenderbuffers", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteRenderbuffersEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DeleteRenderbuffersEXT) {
-         snprintf(symboln, sizeof(symboln), "%sDeleteRenderbuffersEXT", symbol_prefix);
-         SET_DeleteRenderbuffersEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDeleteRenderbuffersEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DeleteRenderbuffersEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferRenderbufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferRenderbuffer", symbol_prefix);
-         SET_FramebufferRenderbufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferRenderbuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferRenderbufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferRenderbufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferRenderbufferEXT", symbol_prefix);
-         SET_FramebufferRenderbufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferRenderbufferEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferRenderbufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferTexture1DEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferTexture1D", symbol_prefix);
-         SET_FramebufferTexture1DEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferTexture1D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture1DEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferTexture1DEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferTexture1DEXT", symbol_prefix);
-         SET_FramebufferTexture1DEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferTexture1DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture1DEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferTexture2DEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferTexture2D", symbol_prefix);
-         SET_FramebufferTexture2DEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferTexture2D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture2DEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferTexture2DEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferTexture2DEXT", symbol_prefix);
-         SET_FramebufferTexture2DEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferTexture2DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture2DEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferTexture3DEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferTexture3D", symbol_prefix);
-         SET_FramebufferTexture3DEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferTexture3D", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture3DEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferTexture3DEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferTexture3DEXT", symbol_prefix);
-         SET_FramebufferTexture3DEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferTexture3DEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture3DEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenFramebuffersEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGenFramebuffers", symbol_prefix);
-         SET_GenFramebuffersEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenFramebuffers", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenFramebuffersEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenFramebuffersEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGenFramebuffersEXT", symbol_prefix);
-         SET_GenFramebuffersEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenFramebuffersEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenFramebuffersEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenRenderbuffersEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGenRenderbuffers", symbol_prefix);
-         SET_GenRenderbuffersEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenRenderbuffers", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenRenderbuffersEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenRenderbuffersEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGenRenderbuffersEXT", symbol_prefix);
-         SET_GenRenderbuffersEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenRenderbuffersEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenRenderbuffersEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenerateMipmapEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGenerateMipmap", symbol_prefix);
-         SET_GenerateMipmapEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenerateMipmap", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenerateMipmapEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GenerateMipmapEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGenerateMipmapEXT", symbol_prefix);
-         SET_GenerateMipmapEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGenerateMipmapEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GenerateMipmapEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetFramebufferAttachmentParameterivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetFramebufferAttachmentParameteriv", symbol_prefix);
-         SET_GetFramebufferAttachmentParameterivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetFramebufferAttachmentParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetFramebufferAttachmentParameterivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetFramebufferAttachmentParameterivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetFramebufferAttachmentParameterivEXT", symbol_prefix);
-         SET_GetFramebufferAttachmentParameterivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetFramebufferAttachmentParameterivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetFramebufferAttachmentParameterivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetRenderbufferParameterivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetRenderbufferParameteriv", symbol_prefix);
-         SET_GetRenderbufferParameterivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetRenderbufferParameteriv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetRenderbufferParameterivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetRenderbufferParameterivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetRenderbufferParameterivEXT", symbol_prefix);
-         SET_GetRenderbufferParameterivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetRenderbufferParameterivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetRenderbufferParameterivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsFramebufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sIsFramebuffer", symbol_prefix);
-         SET_IsFramebufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsFramebuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsFramebufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsFramebufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sIsFramebufferEXT", symbol_prefix);
-         SET_IsFramebufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsFramebufferEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsFramebufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsRenderbufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sIsRenderbuffer", symbol_prefix);
-         SET_IsRenderbufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsRenderbuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsRenderbufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsRenderbufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sIsRenderbufferEXT", symbol_prefix);
-         SET_IsRenderbufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsRenderbufferEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsRenderbufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RenderbufferStorageEXT) {
-         snprintf(symboln, sizeof(symboln), "%sRenderbufferStorage", symbol_prefix);
-         SET_RenderbufferStorageEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRenderbufferStorage", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RenderbufferStorageEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->RenderbufferStorageEXT) {
-         snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageEXT", symbol_prefix);
-         SET_RenderbufferStorageEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->RenderbufferStorageEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlitFramebufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBlitFramebuffer", symbol_prefix);
-         SET_BlitFramebufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlitFramebuffer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlitFramebufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BlitFramebufferEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBlitFramebufferEXT", symbol_prefix);
-         SET_BlitFramebufferEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBlitFramebufferEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BlitFramebufferEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BufferParameteriAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sBufferParameteriAPPLE", symbol_prefix);
-         SET_BufferParameteriAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBufferParameteriAPPLE", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BufferParameteriAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FlushMappedBufferRangeAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sFlushMappedBufferRangeAPPLE", symbol_prefix);
-         SET_FlushMappedBufferRangeAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFlushMappedBufferRangeAPPLE", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FlushMappedBufferRangeAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindFragDataLocationEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBindFragDataLocationEXT", symbol_prefix);
-         SET_BindFragDataLocationEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindFragDataLocationEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindFragDataLocationEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindFragDataLocationEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBindFragDataLocation", symbol_prefix);
-         SET_BindFragDataLocationEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindFragDataLocation", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindFragDataLocationEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetFragDataLocationEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetFragDataLocationEXT", symbol_prefix);
-         SET_GetFragDataLocationEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetFragDataLocationEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetFragDataLocationEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetFragDataLocationEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetFragDataLocation", symbol_prefix);
-         SET_GetFragDataLocationEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetFragDataLocation", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetFragDataLocationEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetUniformuivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetUniformuivEXT", symbol_prefix);
-         SET_GetUniformuivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetUniformuivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformuivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetUniformuivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetUniformuiv", symbol_prefix);
-         SET_GetUniformuivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetUniformuiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformuivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribIivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIivEXT", symbol_prefix);
-         SET_GetVertexAttribIivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribIivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribIivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIiv", symbol_prefix);
-         SET_GetVertexAttribIivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribIivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribIuivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIuivEXT", symbol_prefix);
-         SET_GetVertexAttribIuivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIuivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribIuivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetVertexAttribIuivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIuiv", symbol_prefix);
-         SET_GetVertexAttribIuivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIuiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribIuivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1uiEXT", symbol_prefix);
-         SET_Uniform1uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1uiEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1ui", symbol_prefix);
-         SET_Uniform1uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1ui", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1uivEXT", symbol_prefix);
-         SET_Uniform1uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1uivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform1uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform1uiv", symbol_prefix);
-         SET_Uniform1uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform1uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2uiEXT", symbol_prefix);
-         SET_Uniform2uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2uiEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2ui", symbol_prefix);
-         SET_Uniform2uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2ui", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2uivEXT", symbol_prefix);
-         SET_Uniform2uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2uivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform2uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform2uiv", symbol_prefix);
-         SET_Uniform2uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform2uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3uiEXT", symbol_prefix);
-         SET_Uniform3uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3uiEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3ui", symbol_prefix);
-         SET_Uniform3uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3ui", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3uivEXT", symbol_prefix);
-         SET_Uniform3uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3uivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform3uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform3uiv", symbol_prefix);
-         SET_Uniform3uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform3uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4uiEXT", symbol_prefix);
-         SET_Uniform4uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4uiEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4ui", symbol_prefix);
-         SET_Uniform4uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4ui", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4uivEXT", symbol_prefix);
-         SET_Uniform4uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4uivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->Uniform4uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUniform4uiv", symbol_prefix);
-         SET_Uniform4uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUniform4uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI1iEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI1iEXT", symbol_prefix);
-         SET_VertexAttribI1iEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI1iEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1iEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI1iEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI1i", symbol_prefix);
-         SET_VertexAttribI1iEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI1i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1iEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI1ivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI1ivEXT", symbol_prefix);
-         SET_VertexAttribI1ivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI1ivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1ivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI1ivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI1iv", symbol_prefix);
-         SET_VertexAttribI1ivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI1iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1ivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI1uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uiEXT", symbol_prefix);
-         SET_VertexAttribI1uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uiEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI1uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI1ui", symbol_prefix);
-         SET_VertexAttribI1uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI1ui", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI1uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uivEXT", symbol_prefix);
-         SET_VertexAttribI1uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI1uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uiv", symbol_prefix);
-         SET_VertexAttribI1uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI2iEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI2iEXT", symbol_prefix);
-         SET_VertexAttribI2iEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI2iEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2iEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI2iEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI2i", symbol_prefix);
-         SET_VertexAttribI2iEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI2i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2iEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI2ivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI2ivEXT", symbol_prefix);
-         SET_VertexAttribI2ivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI2ivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2ivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI2ivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI2iv", symbol_prefix);
-         SET_VertexAttribI2ivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI2iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2ivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI2uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uiEXT", symbol_prefix);
-         SET_VertexAttribI2uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uiEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI2uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI2ui", symbol_prefix);
-         SET_VertexAttribI2uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI2ui", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI2uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uivEXT", symbol_prefix);
-         SET_VertexAttribI2uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI2uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uiv", symbol_prefix);
-         SET_VertexAttribI2uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI3iEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI3iEXT", symbol_prefix);
-         SET_VertexAttribI3iEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI3iEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3iEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI3iEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI3i", symbol_prefix);
-         SET_VertexAttribI3iEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI3i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3iEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI3ivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI3ivEXT", symbol_prefix);
-         SET_VertexAttribI3ivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI3ivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3ivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI3ivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI3iv", symbol_prefix);
-         SET_VertexAttribI3ivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI3iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3ivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI3uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uiEXT", symbol_prefix);
-         SET_VertexAttribI3uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uiEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI3uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI3ui", symbol_prefix);
-         SET_VertexAttribI3uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI3ui", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI3uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uivEXT", symbol_prefix);
-         SET_VertexAttribI3uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI3uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uiv", symbol_prefix);
-         SET_VertexAttribI3uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4bvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4bvEXT", symbol_prefix);
-         SET_VertexAttribI4bvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4bvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4bvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4bvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4bv", symbol_prefix);
-         SET_VertexAttribI4bvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4bv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4bvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4iEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4iEXT", symbol_prefix);
-         SET_VertexAttribI4iEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4iEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4iEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4iEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4i", symbol_prefix);
-         SET_VertexAttribI4iEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4i", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4iEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4ivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ivEXT", symbol_prefix);
-         SET_VertexAttribI4ivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4ivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4ivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4iv", symbol_prefix);
-         SET_VertexAttribI4ivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4iv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4ivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4svEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4svEXT", symbol_prefix);
-         SET_VertexAttribI4svEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4svEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4svEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4svEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4sv", symbol_prefix);
-         SET_VertexAttribI4svEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4sv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4svEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4ubvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ubvEXT", symbol_prefix);
-         SET_VertexAttribI4ubvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ubvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4ubvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4ubvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ubv", symbol_prefix);
-         SET_VertexAttribI4ubvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ubv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4ubvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uiEXT", symbol_prefix);
-         SET_VertexAttribI4uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uiEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4uiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ui", symbol_prefix);
-         SET_VertexAttribI4uiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ui", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4uiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uivEXT", symbol_prefix);
-         SET_VertexAttribI4uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4uivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uiv", symbol_prefix);
-         SET_VertexAttribI4uivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4uivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4usvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4usvEXT", symbol_prefix);
-         SET_VertexAttribI4usvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4usvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4usvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribI4usvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribI4usv", symbol_prefix);
-         SET_VertexAttribI4usvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribI4usv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4usvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribIPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribIPointerEXT", symbol_prefix);
-         SET_VertexAttribIPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribIPointerEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribIPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->VertexAttribIPointerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sVertexAttribIPointer", symbol_prefix);
-         SET_VertexAttribIPointerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sVertexAttribIPointer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribIPointerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferTextureLayerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferTextureLayer", symbol_prefix);
-         SET_FramebufferTextureLayerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferTextureLayer", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTextureLayerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->FramebufferTextureLayerEXT) {
-         snprintf(symboln, sizeof(symboln), "%sFramebufferTextureLayerEXT", symbol_prefix);
-         SET_FramebufferTextureLayerEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sFramebufferTextureLayerEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTextureLayerEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorMaskIndexedEXT) {
-         snprintf(symboln, sizeof(symboln), "%sColorMaskIndexedEXT", symbol_prefix);
-         SET_ColorMaskIndexedEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorMaskIndexedEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorMaskIndexedEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ColorMaskIndexedEXT) {
-         snprintf(symboln, sizeof(symboln), "%sColorMaski", symbol_prefix);
-         SET_ColorMaskIndexedEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sColorMaski", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ColorMaskIndexedEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DisableIndexedEXT) {
-         snprintf(symboln, sizeof(symboln), "%sDisableIndexedEXT", symbol_prefix);
-         SET_DisableIndexedEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDisableIndexedEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DisableIndexedEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->DisableIndexedEXT) {
-         snprintf(symboln, sizeof(symboln), "%sDisablei", symbol_prefix);
-         SET_DisableIndexedEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sDisablei", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->DisableIndexedEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EnableIndexedEXT) {
-         snprintf(symboln, sizeof(symboln), "%sEnableIndexedEXT", symbol_prefix);
-         SET_EnableIndexedEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEnableIndexedEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EnableIndexedEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EnableIndexedEXT) {
-         snprintf(symboln, sizeof(symboln), "%sEnablei", symbol_prefix);
-         SET_EnableIndexedEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEnablei", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EnableIndexedEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetBooleanIndexedvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetBooleanIndexedvEXT", symbol_prefix);
-         SET_GetBooleanIndexedvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetBooleanIndexedvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetBooleanIndexedvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetBooleanIndexedvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetBooleani_v", symbol_prefix);
-         SET_GetBooleanIndexedvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetBooleani_v", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetBooleanIndexedvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetIntegerIndexedvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetIntegerIndexedvEXT", symbol_prefix);
-         SET_GetIntegerIndexedvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetIntegerIndexedvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetIntegerIndexedvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetIntegerIndexedvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetIntegeri_v", symbol_prefix);
-         SET_GetIntegerIndexedvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetIntegeri_v", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetIntegerIndexedvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsEnabledIndexedEXT) {
-         snprintf(symboln, sizeof(symboln), "%sIsEnabledIndexedEXT", symbol_prefix);
-         SET_IsEnabledIndexedEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsEnabledIndexedEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsEnabledIndexedEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->IsEnabledIndexedEXT) {
-         snprintf(symboln, sizeof(symboln), "%sIsEnabledi", symbol_prefix);
-         SET_IsEnabledIndexedEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sIsEnabledi", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->IsEnabledIndexedEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearColorIiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sClearColorIiEXT", symbol_prefix);
-         SET_ClearColorIiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearColorIiEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearColorIiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ClearColorIuiEXT) {
-         snprintf(symboln, sizeof(symboln), "%sClearColorIuiEXT", symbol_prefix);
-         SET_ClearColorIuiEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sClearColorIuiEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ClearColorIuiEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexParameterIivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexParameterIivEXT", symbol_prefix);
-         SET_GetTexParameterIivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexParameterIivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterIivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexParameterIivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexParameterIiv", symbol_prefix);
-         SET_GetTexParameterIivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexParameterIiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterIivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexParameterIuivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexParameterIuivEXT", symbol_prefix);
-         SET_GetTexParameterIuivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexParameterIuivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterIuivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexParameterIuivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexParameterIuiv", symbol_prefix);
-         SET_GetTexParameterIuivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexParameterIuiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterIuivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexParameterIivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sTexParameterIivEXT", symbol_prefix);
-         SET_TexParameterIivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexParameterIivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterIivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexParameterIivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sTexParameterIiv", symbol_prefix);
-         SET_TexParameterIivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexParameterIiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterIivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexParameterIuivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sTexParameterIuivEXT", symbol_prefix);
-         SET_TexParameterIuivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexParameterIuivEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterIuivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TexParameterIuivEXT) {
-         snprintf(symboln, sizeof(symboln), "%sTexParameterIuiv", symbol_prefix);
-         SET_TexParameterIuivEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTexParameterIuiv", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterIuivEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BeginConditionalRenderNV) {
-         snprintf(symboln, sizeof(symboln), "%sBeginConditionalRenderNV", symbol_prefix);
-         SET_BeginConditionalRenderNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBeginConditionalRenderNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BeginConditionalRenderNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BeginConditionalRenderNV) {
-         snprintf(symboln, sizeof(symboln), "%sBeginConditionalRender", symbol_prefix);
-         SET_BeginConditionalRenderNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBeginConditionalRender", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BeginConditionalRenderNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EndConditionalRenderNV) {
-         snprintf(symboln, sizeof(symboln), "%sEndConditionalRenderNV", symbol_prefix);
-         SET_EndConditionalRenderNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEndConditionalRenderNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EndConditionalRenderNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EndConditionalRenderNV) {
-         snprintf(symboln, sizeof(symboln), "%sEndConditionalRender", symbol_prefix);
-         SET_EndConditionalRenderNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEndConditionalRender", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EndConditionalRenderNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BeginTransformFeedbackEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBeginTransformFeedbackEXT", symbol_prefix);
-         SET_BeginTransformFeedbackEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBeginTransformFeedbackEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BeginTransformFeedbackEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BeginTransformFeedbackEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBeginTransformFeedback", symbol_prefix);
-         SET_BeginTransformFeedbackEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBeginTransformFeedback", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BeginTransformFeedbackEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindBufferBaseEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBindBufferBaseEXT", symbol_prefix);
-         SET_BindBufferBaseEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindBufferBaseEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferBaseEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindBufferBaseEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBindBufferBase", symbol_prefix);
-         SET_BindBufferBaseEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindBufferBase", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferBaseEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindBufferOffsetEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBindBufferOffsetEXT", symbol_prefix);
-         SET_BindBufferOffsetEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindBufferOffsetEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferOffsetEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindBufferRangeEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBindBufferRangeEXT", symbol_prefix);
-         SET_BindBufferRangeEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindBufferRangeEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferRangeEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->BindBufferRangeEXT) {
-         snprintf(symboln, sizeof(symboln), "%sBindBufferRange", symbol_prefix);
-         SET_BindBufferRangeEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sBindBufferRange", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferRangeEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EndTransformFeedbackEXT) {
-         snprintf(symboln, sizeof(symboln), "%sEndTransformFeedbackEXT", symbol_prefix);
-         SET_EndTransformFeedbackEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEndTransformFeedbackEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EndTransformFeedbackEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EndTransformFeedbackEXT) {
-         snprintf(symboln, sizeof(symboln), "%sEndTransformFeedback", symbol_prefix);
-         SET_EndTransformFeedbackEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEndTransformFeedback", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EndTransformFeedbackEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTransformFeedbackVaryingEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetTransformFeedbackVaryingEXT", symbol_prefix);
-         SET_GetTransformFeedbackVaryingEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTransformFeedbackVaryingEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTransformFeedbackVaryingEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTransformFeedbackVaryingEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetTransformFeedbackVarying", symbol_prefix);
-         SET_GetTransformFeedbackVaryingEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTransformFeedbackVarying", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTransformFeedbackVaryingEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TransformFeedbackVaryingsEXT) {
-         snprintf(symboln, sizeof(symboln), "%sTransformFeedbackVaryingsEXT", symbol_prefix);
-         SET_TransformFeedbackVaryingsEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTransformFeedbackVaryingsEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TransformFeedbackVaryingsEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TransformFeedbackVaryingsEXT) {
-         snprintf(symboln, sizeof(symboln), "%sTransformFeedbackVaryings", symbol_prefix);
-         SET_TransformFeedbackVaryingsEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTransformFeedbackVaryings", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TransformFeedbackVaryingsEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProvokingVertexEXT) {
-         snprintf(symboln, sizeof(symboln), "%sProvokingVertexEXT", symbol_prefix);
-         SET_ProvokingVertexEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProvokingVertexEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProvokingVertexEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProvokingVertexEXT) {
-         snprintf(symboln, sizeof(symboln), "%sProvokingVertex", symbol_prefix);
-         SET_ProvokingVertexEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProvokingVertex", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProvokingVertexEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetTexParameterPointervAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sGetTexParameterPointervAPPLE", symbol_prefix);
-         SET_GetTexParameterPointervAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetTexParameterPointervAPPLE", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterPointervAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TextureRangeAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sTextureRangeAPPLE", symbol_prefix);
-         SET_TextureRangeAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTextureRangeAPPLE", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TextureRangeAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetObjectParameterivAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sGetObjectParameterivAPPLE", symbol_prefix);
-         SET_GetObjectParameterivAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetObjectParameterivAPPLE", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetObjectParameterivAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ObjectPurgeableAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sObjectPurgeableAPPLE", symbol_prefix);
-         SET_ObjectPurgeableAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sObjectPurgeableAPPLE", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ObjectPurgeableAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ObjectUnpurgeableAPPLE) {
-         snprintf(symboln, sizeof(symboln), "%sObjectUnpurgeableAPPLE", symbol_prefix);
-         SET_ObjectUnpurgeableAPPLE(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sObjectUnpurgeableAPPLE", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ObjectUnpurgeableAPPLE;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ActiveProgramEXT) {
-         snprintf(symboln, sizeof(symboln), "%sActiveProgramEXT", symbol_prefix);
-         SET_ActiveProgramEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sActiveProgramEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ActiveProgramEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->CreateShaderProgramEXT) {
-         snprintf(symboln, sizeof(symboln), "%sCreateShaderProgramEXT", symbol_prefix);
-         SET_CreateShaderProgramEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sCreateShaderProgramEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->CreateShaderProgramEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->UseShaderProgramEXT) {
-         snprintf(symboln, sizeof(symboln), "%sUseShaderProgramEXT", symbol_prefix);
-         SET_UseShaderProgramEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sUseShaderProgramEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->UseShaderProgramEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->TextureBarrierNV) {
-         snprintf(symboln, sizeof(symboln), "%sTextureBarrierNV", symbol_prefix);
-         SET_TextureBarrierNV(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sTextureBarrierNV", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->TextureBarrierNV;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->StencilFuncSeparateATI) {
-         snprintf(symboln, sizeof(symboln), "%sStencilFuncSeparateATI", symbol_prefix);
-         SET_StencilFuncSeparateATI(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sStencilFuncSeparateATI", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->StencilFuncSeparateATI;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramEnvParameters4fvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sProgramEnvParameters4fvEXT", symbol_prefix);
-         SET_ProgramEnvParameters4fvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramEnvParameters4fvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameters4fvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->ProgramLocalParameters4fvEXT) {
-         snprintf(symboln, sizeof(symboln), "%sProgramLocalParameters4fvEXT", symbol_prefix);
-         SET_ProgramLocalParameters4fvEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sProgramLocalParameters4fvEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->ProgramLocalParameters4fvEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetQueryObjecti64vEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetQueryObjecti64vEXT", symbol_prefix);
-         SET_GetQueryObjecti64vEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetQueryObjecti64vEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjecti64vEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->GetQueryObjectui64vEXT) {
-         snprintf(symboln, sizeof(symboln), "%sGetQueryObjectui64vEXT", symbol_prefix);
-         SET_GetQueryObjectui64vEXT(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sGetQueryObjectui64vEXT", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjectui64vEXT;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EGLImageTargetRenderbufferStorageOES) {
-         snprintf(symboln, sizeof(symboln), "%sEGLImageTargetRenderbufferStorageOES", symbol_prefix);
-         SET_EGLImageTargetRenderbufferStorageOES(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEGLImageTargetRenderbufferStorageOES", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EGLImageTargetRenderbufferStorageOES;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
     if(!disp->EGLImageTargetTexture2DOES) {
-         snprintf(symboln, sizeof(symboln), "%sEGLImageTargetTexture2DOES", symbol_prefix);
-         SET_EGLImageTargetTexture2DOES(disp, dlsym(handle, symboln));
+        snprintf(symboln, sizeof(symboln), "%sEGLImageTargetTexture2DOES", symbol_prefix);
+        _glapi_proc *procp = (_glapi_proc *)&disp->EGLImageTargetTexture2DOES;
+        *procp = (_glapi_proc) dlsym(handle, symboln);
     }
 
 
-   return disp;
+    return disp;
 }
 
commit df8d26ec09e7aecea91d8babbe82caf722f3dd2b
Author: Daniel Vetter <daniel.vetter at ffwll.ch>
Date:   Mon Jun 13 23:03:00 2011 +0200

    i915g: add a few more render target formats
    
    Snatched from xvmc.
    
    Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>

diff --git a/src/gallium/drivers/i915/i915_reg.h b/src/gallium/drivers/i915/i915_reg.h
index 6fe032c..14e786d 100644
--- a/src/gallium/drivers/i915/i915_reg.h
+++ b/src/gallium/drivers/i915/i915_reg.h
@@ -170,6 +170,13 @@
 #define COLOR_BUF_RGB555 		(1<<8)
 #define COLOR_BUF_RGB565 		(2<<8)
 #define COLOR_BUF_ARGB8888		(3<<8)
+#define COLOR_BUF_YCRCB_SWAP		(4<<8)
+#define COLOR_BUF_YCRCB_NORMAL		(5<<8)
+#define COLOR_BUF_YCRCB_SWAPUV		(6<<8)
+#define COLOR_BUF_YCRCB_SWAPUVY		(7<<8)
+#define COLOR_BUF_ARGB4444		(8<<8)
+#define COLOR_BUF_ARGB1555		(9<<8)
+#define COLOR_BUF_ARGB2101010		(10<<8)
 #define DEPTH_FRMT_16_FIXED		0
 #define DEPTH_FRMT_16_FLOAT		(1<<2)
 #define DEPTH_FRMT_24_FIXED_8_OTHER	(2<<2)
commit 755f2e2ae597df9208523b0996bbdabf3db463b0
Author: Brian Paul <brianp at vmware.com>
Date:   Mon Jun 13 13:44:35 2011 -0600

    mesa: move texrender.c to swrast
    
    This stuff is really for software rendering, it's not core Mesa.
    A small step toward pushing the FetchTexel() stuff down into swrast.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>

diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index fdb4d5a..24e2155 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -121,7 +121,6 @@ main_sources = [
     'main/texobj.c',
     'main/texpal.c',
     'main/texparam.c',
-    'main/texrender.c',
     'main/texstate.c',
     'main/texstore.c',
     'main/texturebarrier.c',
@@ -174,6 +173,7 @@ swrast_sources = [
     'swrast/s_stencil.c',
     'swrast/s_texcombine.c',
     'swrast/s_texfilter.c',
+    'swrast/s_texrender.c',
     'swrast/s_triangle.c',
     'swrast/s_zoom.c',
 ]
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 0dbc7c3..8ab129d 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -40,7 +40,6 @@
 #include "main/texstore.h"
 #include "main/bufferobj.h"
 #include "main/fbobject.h"
-#include "main/texrender.h"
 #include "main/samplerobj.h"
 #include "main/syncobj.h"
 #include "main/texturebarrier.h"
@@ -183,8 +182,8 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
 
    driver->NewFramebuffer = _mesa_new_framebuffer;
    driver->NewRenderbuffer = _mesa_new_soft_renderbuffer;
-   driver->RenderTexture = _mesa_render_texture;
-   driver->FinishRenderTexture = _mesa_finish_render_texture;
+   driver->RenderTexture = _swrast_render_texture;
+   driver->FinishRenderTexture = _swrast_finish_render_texture;
    driver->FramebufferRenderbuffer = _mesa_framebuffer_renderbuffer;
    driver->ValidateFramebuffer = _mesa_validate_framebuffer;
 
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 83f622d..8277477 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -35,7 +35,7 @@
 #include "main/renderbuffer.h"
 #include "main/context.h"
 #include "main/teximage.h"
-#include "main/texrender.h"
+#include "swrast/s_texrender.h"
 #include "drivers/common/meta.h"
 
 #include "intel_context.h"
@@ -557,7 +557,7 @@ intel_render_texture(struct gl_context * ctx,
        * (has a border, width/height 0, etc.)
        */
       _mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
-      _mesa_render_texture(ctx, fb, att);
+      _swrast_render_texture(ctx, fb, att);
       return;
    }
    else if (!irb) {
@@ -568,14 +568,14 @@ intel_render_texture(struct gl_context * ctx,
       }
       else {
          /* fallback to software rendering */
-         _mesa_render_texture(ctx, fb, att);
+         _swrast_render_texture(ctx, fb, att);
          return;
       }
    }
 
    if (!intel_update_wrapper(ctx, irb, newImage)) {
        _mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
-       _mesa_render_texture(ctx, fb, att);
+       _swrast_render_texture(ctx, fb, att);
        return;
    }
 
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index d3c9257..0986ade 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -35,7 +35,7 @@
 #include "main/framebuffer.h"
 #include "main/renderbuffer.h"
 #include "main/context.h"
-#include "main/texrender.h"
+#include "swrast/s_texrender.h"
 #include "drivers/common/meta.h"
 
 #include "radeon_common.h"
@@ -557,7 +557,7 @@ radeon_render_texture(struct gl_context * ctx,
       /* Fallback on drawing to a texture without a miptree.
        */
       _mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
-      _mesa_render_texture(ctx, fb, att);
+      _swrast_render_texture(ctx, fb, att);
       return;
    }
    else if (!rrb) {
@@ -568,14 +568,14 @@ radeon_render_texture(struct gl_context * ctx,
       }
       else {
          /* fallback to software rendering */
-         _mesa_render_texture(ctx, fb, att);
+         _swrast_render_texture(ctx, fb, att);
          return;
       }
    }
 
    if (!radeon_update_wrapper(ctx, rrb, newImage)) {
        _mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
-       _mesa_render_texture(ctx, fb, att);
+       _swrast_render_texture(ctx, fb, att);
        return;
    }
 
diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c
deleted file mode 100644
index a7641a5..0000000
--- a/src/mesa/main/texrender.c
+++ /dev/null
@@ -1,654 +0,0 @@
-
-#include "context.h"
-#include "colormac.h"
-#include "fbobject.h"
-#include "macros.h"
-#include "texfetch.h"
-#include "teximage.h"
-#include "texrender.h"
-#include "renderbuffer.h"
-
-
-/*
- * Render-to-texture code for GL_EXT_framebuffer_object
- */
-
-
-/**
- * Derived from gl_renderbuffer class
- */
-struct texture_renderbuffer
-{
-   struct gl_renderbuffer Base;   /**< Base class object */
-   struct gl_texture_image *TexImage;
-   StoreTexelFunc Store;
-   FetchTexelFuncF Fetchf;
-   GLint Yoffset;                 /**< Layer for 1D array textures. */
-   GLint Zoffset;                 /**< Layer for 2D array textures, or slice
-				   * for 3D textures
-				   */
-};
-
-
-/**
- * Get row of values from the renderbuffer that wraps a texture image.
- */
-static void
-texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-                GLint x, GLint y, void *values)
-{
-   const struct texture_renderbuffer *trb
-      = (const struct texture_renderbuffer *) rb;
-   const GLint z = trb->Zoffset;
-   GLuint i;
-
-   ASSERT(trb->TexImage->Width == rb->Width);
-   ASSERT(trb->TexImage->Height == rb->Height);
-
-   y += trb->Yoffset;
-
-   if (rb->DataType == CHAN_TYPE) {
-      GLchan *rgbaOut = (GLchan *) values;
-      for (i = 0; i < count; i++) {
-         GLfloat rgba[4];
-         trb->Fetchf(trb->TexImage, x + i, y, z, rgba);
-         UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_SHORT) {
-      GLushort *zValues = (GLushort *) values;
-      for (i = 0; i < count; i++) {
-         GLfloat flt;
-         trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
-         zValues[i] = (GLushort) (flt * 0xffff);
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT) {
-      GLuint *zValues = (GLuint *) values;
-      /*
-      const GLdouble scale = (GLdouble) 0xffffffff;
-      */
-      for (i = 0; i < count; i++) {
-         GLfloat flt;
-         trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
-#if 0
-         /* this should work, but doesn't (overflow due to low precision) */
-         zValues[i] = (GLuint) (flt * scale);
-#else
-         /* temporary hack */
-         zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
-#endif
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
-      GLuint *zValues = (GLuint *) values;
-      for (i = 0; i < count; i++) {
-         GLfloat flt;
-         trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
-         zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
-      GLuint *zValues = (GLuint *) values;
-      for (i = 0; i < count; i++) {
-         GLfloat flt;
-         trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
-         zValues[i] = (GLuint) (flt * 0xffffff);
-      }
-   }
-   else {
-      _mesa_problem(ctx, "invalid rb->DataType in texture_get_row");
-   }
-}
-
-
-static void
-texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-                   const GLint x[], const GLint y[], void *values)
-{
-   const struct texture_renderbuffer *trb
-      = (const struct texture_renderbuffer *) rb;
-   const GLint z = trb->Zoffset;
-   GLuint i;
-
-   if (rb->DataType == CHAN_TYPE) {
-      GLchan *rgbaOut = (GLchan *) values;
-      for (i = 0; i < count; i++) {
-         GLfloat rgba[4];
-         trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
-				    z, rgba);
-         UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_SHORT) {
-      GLushort *zValues = (GLushort *) values;
-      for (i = 0; i < count; i++) {
-         GLfloat flt;
-         trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
-				    z, &flt);
-         zValues[i] = (GLushort) (flt * 0xffff);
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT) {
-      GLuint *zValues = (GLuint *) values;
-      for (i = 0; i < count; i++) {
-         GLfloat flt;
-         trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
-				    z, &flt);
-#if 0
-         zValues[i] = (GLuint) (flt * 0xffffffff);
-#else
-         zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
-#endif
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
-      GLuint *zValues = (GLuint *) values;
-      for (i = 0; i < count; i++) {
-         GLfloat flt;
-         trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
-				    z, &flt);
-         zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
-      GLuint *zValues = (GLuint *) values;
-      for (i = 0; i < count; i++) {
-         GLfloat flt;
-         trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
-				    z, &flt);
-         zValues[i] = (GLuint) (flt * 0xffffff);
-      }
-   }
-   else {
-      _mesa_problem(ctx, "invalid rb->DataType in texture_get_values");
-   }
-}
-
-
-/**
- * Put row of values into a renderbuffer that wraps a texture image.
- */
-static void
-texture_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-                GLint x, GLint y, const void *values, const GLubyte *mask)
-{
-   const struct texture_renderbuffer *trb
-      = (const struct texture_renderbuffer *) rb;
-   const GLint z = trb->Zoffset;
-   GLuint i;
-
-   y += trb->Yoffset;
-
-   if (rb->DataType == CHAN_TYPE) {
-      const GLchan *rgba = (const GLchan *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x + i, y, z, rgba);
-         }
-         rgba += 4;
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_SHORT) {
-      const GLushort *zValues = (const GLushort *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x + i, y, z, zValues + i);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT) {
-      const GLuint *zValues = (const GLuint *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x + i, y, z, zValues + i);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
-      const GLuint *zValues = (const GLuint *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            GLfloat flt = (GLfloat) ((zValues[i] >> 8) * (1.0 / 0xffffff));
-            trb->Store(trb->TexImage, x + i, y, z, &flt);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
-      const GLuint *zValues = (const GLuint *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
-            trb->Store(trb->TexImage, x + i, y, z, &flt);
-         }
-      }
-   }
-   else {
-      _mesa_problem(ctx, "invalid rb->DataType in texture_put_row");
-   }
-}
-
-/**
- * Put row of RGB values into a renderbuffer that wraps a texture image.
- */
-static void
-texture_put_row_rgb(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-                GLint x, GLint y, const void *values, const GLubyte *mask)
-{
-   const struct texture_renderbuffer *trb
-      = (const struct texture_renderbuffer *) rb;
-   const GLint z = trb->Zoffset;
-   GLuint i;
-
-   y += trb->Yoffset;
-
-   if (rb->DataType == CHAN_TYPE) {
-      const GLchan *rgb = (const GLchan *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x + i, y, z, rgb);
-         }
-         rgb += 3;
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_SHORT) {
-      const GLushort *zValues = (const GLushort *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x + i, y, z, zValues + i);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT) {
-      const GLuint *zValues = (const GLuint *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x + i, y, z, zValues + i);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
-      const GLuint *zValues = (const GLuint *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            GLfloat flt = (GLfloat) ((zValues[i] >> 8) * (1.0 / 0xffffff));
-            trb->Store(trb->TexImage, x + i, y, z, &flt);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
-      const GLuint *zValues = (const GLuint *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
-            trb->Store(trb->TexImage, x + i, y, z, &flt);
-         }
-      }
-   }
-   else {
-      _mesa_problem(ctx, "invalid rb->DataType in texture_put_row");
-   }
-}
-
-
-static void
-texture_put_mono_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-                     GLint x, GLint y, const void *value, const GLubyte *mask)
-{
-   const struct texture_renderbuffer *trb
-      = (const struct texture_renderbuffer *) rb;
-   const GLint z = trb->Zoffset;
-   GLuint i;
-
-   y += trb->Yoffset;
-
-   if (rb->DataType == CHAN_TYPE) {
-      const GLchan *rgba = (const GLchan *) value;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x + i, y, z, rgba);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_SHORT) {
-      const GLushort zValue = *((const GLushort *) value);
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x + i, y, z, &zValue);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT) {
-      const GLuint zValue = *((const GLuint *) value);
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x + i, y, z, &zValue);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
-      const GLuint zValue = *((const GLuint *) value);
-      const GLfloat flt = (GLfloat) ((zValue >> 8) * (1.0 / 0xffffff));
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x + i, y, z, &flt);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
-      const GLuint zValue = *((const GLuint *) value);
-      const GLfloat flt = (GLfloat) ((zValue & 0xffffff) * (1.0 / 0xffffff));
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x + i, y, z, &flt);
-         }
-      }
-   }
-   else {
-      _mesa_problem(ctx, "invalid rb->DataType in texture_put_mono_row");
-   }
-}
-
-
-static void
-texture_put_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-                   const GLint x[], const GLint y[], const void *values,
-                   const GLubyte *mask)
-{
-   const struct texture_renderbuffer *trb
-      = (const struct texture_renderbuffer *) rb;
-   const GLint z = trb->Zoffset;
-   GLuint i;
-
-   if (rb->DataType == CHAN_TYPE) {
-      const GLchan *rgba = (const GLchan *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, rgba);
-         }
-         rgba += 4;
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_SHORT) {
-      const GLushort *zValues = (const GLushort *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, zValues + i);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT) {
-      const GLuint *zValues = (const GLuint *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, zValues + i);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
-      const GLuint *zValues = (const GLuint *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            GLfloat flt = (GLfloat) ((zValues[i] >> 8) * (1.0 / 0xffffff));
-            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
-      const GLuint *zValues = (const GLuint *) values;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
-            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
-         }
-      }
-   }
-   else {
-      _mesa_problem(ctx, "invalid rb->DataType in texture_put_values");
-   }
-}
-
-
-static void
-texture_put_mono_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
-                        GLuint count, const GLint x[], const GLint y[],
-                        const void *value, const GLubyte *mask)
-{
-   const struct texture_renderbuffer *trb
-      = (const struct texture_renderbuffer *) rb;
-   const GLint z = trb->Zoffset;
-   GLuint i;
-
-   if (rb->DataType == CHAN_TYPE) {
-      const GLchan *rgba = (const GLchan *) value;
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, rgba);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT) {
-      const GLuint zValue = *((const GLuint *) value);
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &zValue);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_SHORT) {
-      const GLushort zValue = *((const GLushort *) value);
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &zValue);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
-      const GLuint zValue = *((const GLuint *) value);
-      const GLfloat flt = (GLfloat) ((zValue >> 8) * (1.0 / 0xffffff));
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
-         }
-      }
-   }
-   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
-      const GLuint zValue = *((const GLuint *) value);
-      const GLfloat flt = (GLfloat) ((zValue & 0xffffff) * (1.0 / 0xffffff));
-      for (i = 0; i < count; i++) {
-         if (!mask || mask[i]) {
-            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
-         }
-      }
-   }
-   else {
-      _mesa_problem(ctx, "invalid rb->DataType in texture_put_mono_values");
-   }
-}
-
-
-static void
-store_nop(struct gl_texture_image *texImage,
-          GLint col, GLint row, GLint img,
-          const void *texel)
-{
-}
-
-
-static void
-delete_texture_wrapper(struct gl_renderbuffer *rb)
-{
-   ASSERT(rb->RefCount == 0);
-   free(rb);
-}
-
-
-/**
- * This function creates a renderbuffer object which wraps a texture image.
- * The new renderbuffer is plugged into the given attachment point.
- * This allows rendering into the texture as if it were a renderbuffer.
- */
-static void
-wrap_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
-{
-   struct texture_renderbuffer *trb;
-   const GLuint name = 0;
-
-   ASSERT(att->Type == GL_TEXTURE);
-   ASSERT(att->Renderbuffer == NULL);
-
-   trb = CALLOC_STRUCT(texture_renderbuffer);
-   if (!trb) {
-      _mesa_error(ctx, GL_OUT_OF_MEMORY, "wrap_texture");
-      return;
-   }
-
-   /* init base gl_renderbuffer fields */
-   _mesa_init_renderbuffer(&trb->Base, name);
-   /* plug in our texture_renderbuffer-specific functions */
-   trb->Base.Delete = delete_texture_wrapper;
-   trb->Base.AllocStorage = NULL; /* illegal! */
-   trb->Base.GetRow = texture_get_row;
-   trb->Base.GetValues = texture_get_values;
-   trb->Base.PutRow = texture_put_row;
-   trb->Base.PutRowRGB = texture_put_row_rgb;
-   trb->Base.PutMonoRow = texture_put_mono_row;
-   trb->Base.PutValues = texture_put_values;
-   trb->Base.PutMonoValues = texture_put_mono_values;
-
-   /* update attachment point */
-   _mesa_reference_renderbuffer(&att->Renderbuffer, &(trb->Base));
-}
-
-/**
- * Update the renderbuffer wrapper for rendering to a texture.
- * For example, update the width, height of the RB based on the texture size,
- * update the internal format info, etc.
- */
-static void
-update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
-{
-   struct texture_renderbuffer *trb
-      = (struct texture_renderbuffer *) att->Renderbuffer;
-
-   (void) ctx;
-   ASSERT(trb);
-
-   trb->TexImage = _mesa_get_attachment_teximage(att);
-   ASSERT(trb->TexImage);
-
-   trb->Store = _mesa_get_texel_store_func(trb->TexImage->TexFormat);
-   if (!trb->Store) {
-      /* we'll never draw into some textures (compressed formats) */
-      trb->Store = store_nop;
-   }
-
-   trb->Fetchf = trb->TexImage->FetchTexelf;
-
-   if (att->Texture->Target == GL_TEXTURE_1D_ARRAY_EXT) {
-      trb->Yoffset = att->Zoffset;
-      trb->Zoffset = 0;
-   }
-   else {
-      trb->Yoffset = 0;
-      trb->Zoffset = att->Zoffset;
-   }
-
-   trb->Base.Width = trb->TexImage->Width;
-   trb->Base.Height = trb->TexImage->Height;
-   trb->Base.InternalFormat = trb->TexImage->InternalFormat;
-   trb->Base.Format = trb->TexImage->TexFormat;
-
-   /* XXX may need more special cases here */
-   switch (trb->TexImage->TexFormat) {
-   case MESA_FORMAT_Z24_S8:
-      trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
-      trb->Base._BaseFormat = GL_DEPTH_STENCIL;
-      break;
-   case MESA_FORMAT_S8_Z24:
-      trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA;
-      trb->Base._BaseFormat = GL_DEPTH_STENCIL;
-      break;
-   case MESA_FORMAT_Z24_X8:
-      trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
-      trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
-      break;
-   case MESA_FORMAT_X8_Z24:
-      trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA;
-      trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
-      break;
-   case MESA_FORMAT_Z16:
-      trb->Base.DataType = GL_UNSIGNED_SHORT;
-      trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
-      break;
-   case MESA_FORMAT_Z32:
-      trb->Base.DataType = GL_UNSIGNED_INT;
-      trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
-      break;
-   /* SRGB formats pre EXT_framebuffer_sRGB don't do sRGB translations on FBO readback */
-   case MESA_FORMAT_SRGB8:
-      trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_RGB888, _mesa_get_texture_dimensions(att->Texture->Target));
-      trb->Base.DataType = CHAN_TYPE;
-      trb->Base._BaseFormat = GL_RGBA;
-      break;
-   case MESA_FORMAT_SRGBA8:
-      trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_RGBA8888, _mesa_get_texture_dimensions(att->Texture->Target));
-      trb->Base.DataType = CHAN_TYPE;
-      trb->Base._BaseFormat = GL_RGBA;
-      break;
-   case MESA_FORMAT_SARGB8:
-      trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_ARGB8888, _mesa_get_texture_dimensions(att->Texture->Target));
-      trb->Base.DataType = CHAN_TYPE;
-      trb->Base._BaseFormat = GL_RGBA;
-      break;
-   default:
-      trb->Base.DataType = CHAN_TYPE;
-      trb->Base._BaseFormat = GL_RGBA;
-   }
-   trb->Base.Data = trb->TexImage->Data;
-}
-
-
-
-/**
- * Called when rendering to a texture image begins, or when changing
- * the dest mipmap level, cube face, etc.
- * This is a fallback routine for software render-to-texture.
- *
- * Called via the glRenderbufferTexture1D/2D/3D() functions
- * and elsewhere (such as glTexImage2D).
- *
- * The image we're rendering into is
- * att->Texture->Image[att->CubeMapFace][att->TextureLevel];
- * It'll never be NULL.
- *
- * \param fb  the framebuffer object the texture is being bound to
- * \param att  the fb attachment point of the texture
- *
- * \sa _mesa_framebuffer_renderbuffer
- */
-void
-_mesa_render_texture(struct gl_context *ctx,
-                     struct gl_framebuffer *fb,
-                     struct gl_renderbuffer_attachment *att)
-{
-   (void) fb;
-
-   if (!att->Renderbuffer) {
-      wrap_texture(ctx, att);
-   }
-   update_wrapper(ctx, att);
-}
-
-
-void
-_mesa_finish_render_texture(struct gl_context *ctx,
-                            struct gl_renderbuffer_attachment *att)
-{
-   /* do nothing */
-   /* The renderbuffer texture wrapper will get deleted by the
-    * normal mechanism for deleting renderbuffers.
-    */
-   (void) ctx;
-   (void) att;
-}
diff --git a/src/mesa/main/texrender.h b/src/mesa/main/texrender.h
deleted file mode 100644
index cacd091..0000000
--- a/src/mesa/main/texrender.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef TEXRENDER_H
-#define TEXRENDER_H
-
-struct gl_context;
-struct gl_framebuffer;
-struct gl_renderbuffer_attachment;
-
-extern void
-_mesa_render_texture(struct gl_context *ctx,
-                     struct gl_framebuffer *fb,
-                     struct gl_renderbuffer_attachment *att);
-
-extern void
-_mesa_finish_render_texture(struct gl_context *ctx,
-                            struct gl_renderbuffer_attachment *att);
-
-
-#endif /* TEXRENDER_H */
diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
index 9b2cb1a..4b2ec08 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -92,7 +92,6 @@ MAIN_SOURCES = \
 	main/texobj.c \
 	main/texpal.c \
 	main/texparam.c \
-	main/texrender.c \
 	main/texstate.c \
 	main/texstore.c \
 	main/texturebarrier.c \
@@ -145,6 +144,7 @@ SWRAST_SOURCES = \
 	swrast/s_stencil.c \
 	swrast/s_texcombine.c \
 	swrast/s_texfilter.c \
+	swrast/s_texrender.c \
 	swrast/s_triangle.c \
 	swrast/s_zoom.c
 
diff --git a/src/mesa/swrast/s_texrender.c b/src/mesa/swrast/s_texrender.c
new file mode 100644
index 0000000..52d03c9
--- /dev/null
+++ b/src/mesa/swrast/s_texrender.c
@@ -0,0 +1,654 @@
+
+#include "main/context.h"
+#include "main/colormac.h"
+#include "main/fbobject.h"
+#include "main/macros.h"
+#include "main/texfetch.h"
+#include "main/teximage.h"
+#include "main/renderbuffer.h"
+#include "swrast/swrast.h"
+
+
+/*
+ * Render-to-texture code for GL_EXT_framebuffer_object
+ */
+
+
+/**
+ * Derived from gl_renderbuffer class
+ */
+struct texture_renderbuffer
+{
+   struct gl_renderbuffer Base;   /**< Base class object */
+   struct gl_texture_image *TexImage;
+   StoreTexelFunc Store;
+   FetchTexelFuncF Fetchf;
+   GLint Yoffset;                 /**< Layer for 1D array textures. */
+   GLint Zoffset;                 /**< Layer for 2D array textures, or slice
+				   * for 3D textures
+				   */
+};
+
+
+/**
+ * Get row of values from the renderbuffer that wraps a texture image.
+ */
+static void
+texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+                GLint x, GLint y, void *values)
+{
+   const struct texture_renderbuffer *trb
+      = (const struct texture_renderbuffer *) rb;
+   const GLint z = trb->Zoffset;
+   GLuint i;
+
+   ASSERT(trb->TexImage->Width == rb->Width);
+   ASSERT(trb->TexImage->Height == rb->Height);
+
+   y += trb->Yoffset;
+
+   if (rb->DataType == CHAN_TYPE) {
+      GLchan *rgbaOut = (GLchan *) values;
+      for (i = 0; i < count; i++) {
+         GLfloat rgba[4];
+         trb->Fetchf(trb->TexImage, x + i, y, z, rgba);
+         UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_SHORT) {
+      GLushort *zValues = (GLushort *) values;
+      for (i = 0; i < count; i++) {
+         GLfloat flt;
+         trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
+         zValues[i] = (GLushort) (flt * 0xffff);
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT) {
+      GLuint *zValues = (GLuint *) values;
+      /*
+      const GLdouble scale = (GLdouble) 0xffffffff;
+      */
+      for (i = 0; i < count; i++) {
+         GLfloat flt;
+         trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
+#if 0
+         /* this should work, but doesn't (overflow due to low precision) */
+         zValues[i] = (GLuint) (flt * scale);
+#else
+         /* temporary hack */
+         zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
+#endif
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
+      GLuint *zValues = (GLuint *) values;
+      for (i = 0; i < count; i++) {
+         GLfloat flt;
+         trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
+         zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+      GLuint *zValues = (GLuint *) values;
+      for (i = 0; i < count; i++) {
+         GLfloat flt;
+         trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
+         zValues[i] = (GLuint) (flt * 0xffffff);
+      }
+   }
+   else {
+      _mesa_problem(ctx, "invalid rb->DataType in texture_get_row");
+   }
+}
+
+
+static void
+texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+                   const GLint x[], const GLint y[], void *values)
+{
+   const struct texture_renderbuffer *trb
+      = (const struct texture_renderbuffer *) rb;
+   const GLint z = trb->Zoffset;
+   GLuint i;
+
+   if (rb->DataType == CHAN_TYPE) {
+      GLchan *rgbaOut = (GLchan *) values;
+      for (i = 0; i < count; i++) {
+         GLfloat rgba[4];
+         trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+				    z, rgba);
+         UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_SHORT) {
+      GLushort *zValues = (GLushort *) values;
+      for (i = 0; i < count; i++) {
+         GLfloat flt;
+         trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+				    z, &flt);
+         zValues[i] = (GLushort) (flt * 0xffff);
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT) {
+      GLuint *zValues = (GLuint *) values;
+      for (i = 0; i < count; i++) {
+         GLfloat flt;
+         trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+				    z, &flt);
+#if 0
+         zValues[i] = (GLuint) (flt * 0xffffffff);
+#else
+         zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
+#endif
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
+      GLuint *zValues = (GLuint *) values;
+      for (i = 0; i < count; i++) {
+         GLfloat flt;
+         trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+				    z, &flt);
+         zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+      GLuint *zValues = (GLuint *) values;
+      for (i = 0; i < count; i++) {
+         GLfloat flt;
+         trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+				    z, &flt);
+         zValues[i] = (GLuint) (flt * 0xffffff);
+      }
+   }
+   else {
+      _mesa_problem(ctx, "invalid rb->DataType in texture_get_values");
+   }
+}
+
+
+/**
+ * Put row of values into a renderbuffer that wraps a texture image.
+ */
+static void
+texture_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+                GLint x, GLint y, const void *values, const GLubyte *mask)
+{
+   const struct texture_renderbuffer *trb
+      = (const struct texture_renderbuffer *) rb;
+   const GLint z = trb->Zoffset;
+   GLuint i;
+
+   y += trb->Yoffset;
+
+   if (rb->DataType == CHAN_TYPE) {
+      const GLchan *rgba = (const GLchan *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x + i, y, z, rgba);
+         }
+         rgba += 4;
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_SHORT) {
+      const GLushort *zValues = (const GLushort *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x + i, y, z, zValues + i);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT) {
+      const GLuint *zValues = (const GLuint *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x + i, y, z, zValues + i);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
+      const GLuint *zValues = (const GLuint *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            GLfloat flt = (GLfloat) ((zValues[i] >> 8) * (1.0 / 0xffffff));
+            trb->Store(trb->TexImage, x + i, y, z, &flt);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+      const GLuint *zValues = (const GLuint *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
+            trb->Store(trb->TexImage, x + i, y, z, &flt);
+         }
+      }
+   }
+   else {
+      _mesa_problem(ctx, "invalid rb->DataType in texture_put_row");
+   }
+}
+
+/**
+ * Put row of RGB values into a renderbuffer that wraps a texture image.
+ */
+static void
+texture_put_row_rgb(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+                GLint x, GLint y, const void *values, const GLubyte *mask)
+{
+   const struct texture_renderbuffer *trb
+      = (const struct texture_renderbuffer *) rb;
+   const GLint z = trb->Zoffset;
+   GLuint i;
+
+   y += trb->Yoffset;
+
+   if (rb->DataType == CHAN_TYPE) {
+      const GLchan *rgb = (const GLchan *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x + i, y, z, rgb);
+         }
+         rgb += 3;
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_SHORT) {
+      const GLushort *zValues = (const GLushort *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x + i, y, z, zValues + i);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT) {
+      const GLuint *zValues = (const GLuint *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x + i, y, z, zValues + i);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
+      const GLuint *zValues = (const GLuint *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            GLfloat flt = (GLfloat) ((zValues[i] >> 8) * (1.0 / 0xffffff));
+            trb->Store(trb->TexImage, x + i, y, z, &flt);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+      const GLuint *zValues = (const GLuint *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
+            trb->Store(trb->TexImage, x + i, y, z, &flt);
+         }
+      }
+   }
+   else {
+      _mesa_problem(ctx, "invalid rb->DataType in texture_put_row");
+   }
+}
+
+
+static void
+texture_put_mono_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+                     GLint x, GLint y, const void *value, const GLubyte *mask)
+{
+   const struct texture_renderbuffer *trb
+      = (const struct texture_renderbuffer *) rb;
+   const GLint z = trb->Zoffset;
+   GLuint i;
+
+   y += trb->Yoffset;
+
+   if (rb->DataType == CHAN_TYPE) {
+      const GLchan *rgba = (const GLchan *) value;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x + i, y, z, rgba);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_SHORT) {
+      const GLushort zValue = *((const GLushort *) value);
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x + i, y, z, &zValue);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT) {
+      const GLuint zValue = *((const GLuint *) value);
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x + i, y, z, &zValue);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
+      const GLuint zValue = *((const GLuint *) value);
+      const GLfloat flt = (GLfloat) ((zValue >> 8) * (1.0 / 0xffffff));
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x + i, y, z, &flt);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+      const GLuint zValue = *((const GLuint *) value);
+      const GLfloat flt = (GLfloat) ((zValue & 0xffffff) * (1.0 / 0xffffff));
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x + i, y, z, &flt);
+         }
+      }
+   }
+   else {
+      _mesa_problem(ctx, "invalid rb->DataType in texture_put_mono_row");
+   }
+}
+
+
+static void
+texture_put_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+                   const GLint x[], const GLint y[], const void *values,
+                   const GLubyte *mask)
+{
+   const struct texture_renderbuffer *trb
+      = (const struct texture_renderbuffer *) rb;
+   const GLint z = trb->Zoffset;
+   GLuint i;
+
+   if (rb->DataType == CHAN_TYPE) {
+      const GLchan *rgba = (const GLchan *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, rgba);
+         }
+         rgba += 4;
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_SHORT) {
+      const GLushort *zValues = (const GLushort *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, zValues + i);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT) {
+      const GLuint *zValues = (const GLuint *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, zValues + i);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
+      const GLuint *zValues = (const GLuint *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            GLfloat flt = (GLfloat) ((zValues[i] >> 8) * (1.0 / 0xffffff));
+            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+      const GLuint *zValues = (const GLuint *) values;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
+            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
+         }
+      }
+   }
+   else {
+      _mesa_problem(ctx, "invalid rb->DataType in texture_put_values");
+   }
+}
+
+
+static void
+texture_put_mono_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
+                        GLuint count, const GLint x[], const GLint y[],
+                        const void *value, const GLubyte *mask)
+{
+   const struct texture_renderbuffer *trb
+      = (const struct texture_renderbuffer *) rb;
+   const GLint z = trb->Zoffset;
+   GLuint i;
+
+   if (rb->DataType == CHAN_TYPE) {
+      const GLchan *rgba = (const GLchan *) value;
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, rgba);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT) {
+      const GLuint zValue = *((const GLuint *) value);
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &zValue);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_SHORT) {
+      const GLushort zValue = *((const GLushort *) value);
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &zValue);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
+      const GLuint zValue = *((const GLuint *) value);
+      const GLfloat flt = (GLfloat) ((zValue >> 8) * (1.0 / 0xffffff));
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
+         }
+      }
+   }
+   else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+      const GLuint zValue = *((const GLuint *) value);
+      const GLfloat flt = (GLfloat) ((zValue & 0xffffff) * (1.0 / 0xffffff));
+      for (i = 0; i < count; i++) {
+         if (!mask || mask[i]) {
+            trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
+         }
+      }
+   }
+   else {
+      _mesa_problem(ctx, "invalid rb->DataType in texture_put_mono_values");
+   }
+}
+
+
+static void
+store_nop(struct gl_texture_image *texImage,
+          GLint col, GLint row, GLint img,
+          const void *texel)
+{
+}
+
+
+static void
+delete_texture_wrapper(struct gl_renderbuffer *rb)
+{
+   ASSERT(rb->RefCount == 0);
+   free(rb);
+}
+
+
+/**
+ * This function creates a renderbuffer object which wraps a texture image.
+ * The new renderbuffer is plugged into the given attachment point.
+ * This allows rendering into the texture as if it were a renderbuffer.
+ */
+static void
+wrap_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
+{
+   struct texture_renderbuffer *trb;
+   const GLuint name = 0;
+
+   ASSERT(att->Type == GL_TEXTURE);
+   ASSERT(att->Renderbuffer == NULL);
+
+   trb = CALLOC_STRUCT(texture_renderbuffer);
+   if (!trb) {
+      _mesa_error(ctx, GL_OUT_OF_MEMORY, "wrap_texture");
+      return;
+   }
+
+   /* init base gl_renderbuffer fields */
+   _mesa_init_renderbuffer(&trb->Base, name);
+   /* plug in our texture_renderbuffer-specific functions */
+   trb->Base.Delete = delete_texture_wrapper;
+   trb->Base.AllocStorage = NULL; /* illegal! */
+   trb->Base.GetRow = texture_get_row;
+   trb->Base.GetValues = texture_get_values;
+   trb->Base.PutRow = texture_put_row;
+   trb->Base.PutRowRGB = texture_put_row_rgb;
+   trb->Base.PutMonoRow = texture_put_mono_row;
+   trb->Base.PutValues = texture_put_values;
+   trb->Base.PutMonoValues = texture_put_mono_values;
+
+   /* update attachment point */
+   _mesa_reference_renderbuffer(&att->Renderbuffer, &(trb->Base));
+}
+
+/**
+ * Update the renderbuffer wrapper for rendering to a texture.
+ * For example, update the width, height of the RB based on the texture size,
+ * update the internal format info, etc.
+ */
+static void
+update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
+{
+   struct texture_renderbuffer *trb
+      = (struct texture_renderbuffer *) att->Renderbuffer;
+
+   (void) ctx;
+   ASSERT(trb);
+
+   trb->TexImage = _mesa_get_attachment_teximage(att);
+   ASSERT(trb->TexImage);
+
+   trb->Store = _mesa_get_texel_store_func(trb->TexImage->TexFormat);
+   if (!trb->Store) {
+      /* we'll never draw into some textures (compressed formats) */
+      trb->Store = store_nop;
+   }
+
+   trb->Fetchf = trb->TexImage->FetchTexelf;
+
+   if (att->Texture->Target == GL_TEXTURE_1D_ARRAY_EXT) {
+      trb->Yoffset = att->Zoffset;
+      trb->Zoffset = 0;
+   }
+   else {
+      trb->Yoffset = 0;
+      trb->Zoffset = att->Zoffset;
+   }
+
+   trb->Base.Width = trb->TexImage->Width;
+   trb->Base.Height = trb->TexImage->Height;
+   trb->Base.InternalFormat = trb->TexImage->InternalFormat;
+   trb->Base.Format = trb->TexImage->TexFormat;
+
+   /* XXX may need more special cases here */
+   switch (trb->TexImage->TexFormat) {
+   case MESA_FORMAT_Z24_S8:
+      trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
+      trb->Base._BaseFormat = GL_DEPTH_STENCIL;
+      break;
+   case MESA_FORMAT_S8_Z24:
+      trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA;
+      trb->Base._BaseFormat = GL_DEPTH_STENCIL;
+      break;
+   case MESA_FORMAT_Z24_X8:
+      trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
+      trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
+      break;
+   case MESA_FORMAT_X8_Z24:
+      trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA;
+      trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
+      break;
+   case MESA_FORMAT_Z16:
+      trb->Base.DataType = GL_UNSIGNED_SHORT;
+      trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
+      break;
+   case MESA_FORMAT_Z32:
+      trb->Base.DataType = GL_UNSIGNED_INT;
+      trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
+      break;
+   /* SRGB formats pre EXT_framebuffer_sRGB don't do sRGB translations on FBO readback */
+   case MESA_FORMAT_SRGB8:
+      trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_RGB888, _mesa_get_texture_dimensions(att->Texture->Target));
+      trb->Base.DataType = CHAN_TYPE;
+      trb->Base._BaseFormat = GL_RGBA;
+      break;
+   case MESA_FORMAT_SRGBA8:
+      trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_RGBA8888, _mesa_get_texture_dimensions(att->Texture->Target));
+      trb->Base.DataType = CHAN_TYPE;
+      trb->Base._BaseFormat = GL_RGBA;
+      break;
+   case MESA_FORMAT_SARGB8:
+      trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_ARGB8888, _mesa_get_texture_dimensions(att->Texture->Target));
+      trb->Base.DataType = CHAN_TYPE;
+      trb->Base._BaseFormat = GL_RGBA;
+      break;
+   default:
+      trb->Base.DataType = CHAN_TYPE;
+      trb->Base._BaseFormat = GL_RGBA;
+   }
+   trb->Base.Data = trb->TexImage->Data;
+}
+
+
+
+/**
+ * Called when rendering to a texture image begins, or when changing
+ * the dest mipmap level, cube face, etc.
+ * This is a fallback routine for software render-to-texture.
+ *
+ * Called via the glRenderbufferTexture1D/2D/3D() functions
+ * and elsewhere (such as glTexImage2D).
+ *
+ * The image we're rendering into is
+ * att->Texture->Image[att->CubeMapFace][att->TextureLevel];
+ * It'll never be NULL.
+ *
+ * \param fb  the framebuffer object the texture is being bound to
+ * \param att  the fb attachment point of the texture
+ *
+ * \sa _mesa_framebuffer_renderbuffer
+ */
+void
+_swrast_render_texture(struct gl_context *ctx,
+                       struct gl_framebuffer *fb,
+                       struct gl_renderbuffer_attachment *att)
+{
+   (void) fb;
+
+   if (!att->Renderbuffer) {
+      wrap_texture(ctx, att);
+   }
+   update_wrapper(ctx, att);
+}
+
+
+void
+_swrast_finish_render_texture(struct gl_context *ctx,
+                              struct gl_renderbuffer_attachment *att)
+{
+   /* do nothing */
+   /* The renderbuffer texture wrapper will get deleted by the
+    * normal mechanism for deleting renderbuffers.
+    */
+   (void) ctx;
+   (void) att;
+}
diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h
index 9b88c70..27b74c3 100644
--- a/src/mesa/swrast/swrast.h
+++ b/src/mesa/swrast/swrast.h
@@ -206,6 +206,16 @@ extern void
 _swrast_eject_texture_images(struct gl_context *ctx);
 
 
+extern void
+_swrast_render_texture(struct gl_context *ctx,
+                       struct gl_framebuffer *fb,
+                       struct gl_renderbuffer_attachment *att);
+
+extern void
+_swrast_finish_render_texture(struct gl_context *ctx,
+                              struct gl_renderbuffer_attachment *att);
+
+
 
 /**
  * The driver interface for the software rasterizer.
commit 8852e35e29ff941172540e1ec7158b9259f46c3c
Author: Brian Paul <brianp at vmware.com>
Date:   Mon Jun 13 13:42:53 2011 -0600

    vbo: minor simplification in print_draw_arrays() debug function

diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 5e9b279..7959337 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -337,7 +337,8 @@ print_draw_arrays(struct gl_context *ctx,
 	  mode, start, count);
 
    for (i = 0; i < 32; i++) {
-      GLuint bufName = exec->array.inputs[i]->BufferObj->Name;
+      struct gl_buffer_object *bufObj = exec->array.inputs[i]->BufferObj;
+      GLuint bufName = bufObj->Name;
       GLint stride = exec->array.inputs[i]->Stride;
       printf("attr %2d: size %d stride %d  enabled %d  "
 	     "ptr %p  Bufobj %u\n",
@@ -350,9 +351,8 @@ print_draw_arrays(struct gl_context *ctx,
 	     bufName);
 
       if (bufName) {
-         struct gl_buffer_object *buf = _mesa_lookup_bufferobj(ctx, bufName);
          GLubyte *p = ctx->Driver.MapBuffer(ctx, GL_ARRAY_BUFFER_ARB,
-                                            GL_READ_ONLY_ARB, buf);
+                                            GL_READ_ONLY_ARB, bufObj);
          int offset = (int) (GLintptr) exec->array.inputs[i]->Ptr;
          float *f = (float *) (p + offset);
          int *k = (int *) f;
@@ -364,7 +364,7 @@ print_draw_arrays(struct gl_context *ctx,
          for (i = 0; i < n; i++) {
             printf("    float[%d] = 0x%08x %f\n", i, k[i], f[i]);
          }
-         ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, buf);
+         ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, bufObj);
       }
    }
 }
commit e6e1864f1c6c9be46b255e390d67de10f8f39509
Author: Brian Paul <brianp at vmware.com>
Date:   Mon Jun 13 08:18:11 2011 -0600

    mesa: move invariant code out of loop in get_tex_rgba()

diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 97d1012..26c2ff9 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -233,6 +233,7 @@ get_tex_rgba(struct gl_context *ctx, GLuint dimensions,
    const GLint width = texImage->Width;
    const GLint height = texImage->Height;
    const GLint depth = texImage->Depth;
+   const GLenum dataType = _mesa_get_format_datatype(texImage->TexFormat);
    /* Normally, no pixel transfer ops are performed during glGetTexImage.
     * The only possible exception is component clamping to [0,1].
     */
@@ -248,6 +249,19 @@ get_tex_rgba(struct gl_context *ctx, GLuint dimensions,
       return;
    }
 
+   /* Clamping does not apply to GetTexImage (final conversion)?
+    * Looks like we need clamp though when going from format
+    * containing negative values to unsigned format.
+    */
+   if (format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA) {
+      transferOps |= IMAGE_CLAMP_BIT;
+   }
+   else if (!type_with_negative_values(type) &&
+            (dataType == GL_FLOAT ||
+             dataType == GL_SIGNED_NORMALIZED)) {
+      transferOps |= IMAGE_CLAMP_BIT;
+   }
+
    /* glGetTexImage always returns sRGB data for sRGB textures. Make sure the
     * fetch functions return sRGB data without linearizing it.
     */
@@ -262,20 +276,6 @@ get_tex_rgba(struct gl_context *ctx, GLuint dimensions,
                                           width, height, format, type,
                                           img, row, 0);
          GLint col;
-         GLenum dataType = _mesa_get_format_datatype(texImage->TexFormat);
-
-         /* clamp does not apply to GetTexImage (final conversion)?
-          * Looks like we need clamp though when going from format
-          * containing negative values to unsigned format.
-          */
-         if (format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA) {
-            transferOps |= IMAGE_CLAMP_BIT;
-         }
-         else if (!type_with_negative_values(type) &&
-                  (dataType == GL_FLOAT ||
-                   dataType == GL_SIGNED_NORMALIZED)) {
-            transferOps |= IMAGE_CLAMP_BIT;
-         }
 
          for (col = 0; col < width; col++) {
             texImage->FetchTexelf(texImage, col, row, img, rgba[col]);
commit 2f0b44f981d1715b62b189f465546d865b10d0f3
Author: Mathias Fröhlich <Mathias.Froehlich at web.de>
Date:   Sat Jun 4 00:21:29 2011 +0200

    r600g: Put shaders into immutable buffers.
    
    Put the shader programs into an immutable buffer object.
    Also make sure that those object can be taken from the user
    space buffer object pool.

diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 3196d97..aeb1175 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -2258,7 +2258,7 @@ int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, stru
 	ve->fs_size = bc.ndw*4;
 
 	/* use PIPE_BIND_VERTEX_BUFFER so we use the cache buffer manager */
-	ve->fetch_shader = r600_bo(rctx->radeon, ve->fs_size, 256, PIPE_BIND_VERTEX_BUFFER, 0);
+	ve->fetch_shader = r600_bo(rctx->radeon, ve->fs_size, 256, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE);
 	if (ve->fetch_shader == NULL) {
 		r600_bc_clear(&bc);
 		return -ENOMEM;
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 39e6d85..d111caa 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -85,7 +85,8 @@ static int r600_pipe_shader(struct pipe_context *ctx, struct r600_pipe_shader *s
 
 	/* copy new shader */
 	if (shader->bo == NULL) {
-		shader->bo = r600_bo(rctx->radeon, rshader->bc.ndw * 4, 4096, 0, 0);
+		/* use PIPE_BIND_VERTEX_BUFFER so we use the cache buffer manager */
+		shader->bo = r600_bo(rctx->radeon, rshader->bc.ndw * 4, 4096, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE);
 		if (shader->bo == NULL) {
 			return -ENOMEM;
 		}
commit b0f1767d776e2c80cab4343b4cd59553fbf5e48a
Author: Mathias Fröhlich <Mathias.Froehlich at gmx.net>
Date:   Sun Jun 12 14:32:03 2011 +0200

    r600g: Allow VRAM for the initial domain for every buffer binding.

diff --git a/src/gallium/winsys/r600/drm/r600_bo.c b/src/gallium/winsys/r600/drm/r600_bo.c
index 093660f..4098a6e 100644
--- a/src/gallium/winsys/r600/drm/r600_bo.c
+++ b/src/gallium/winsys/r600/drm/r600_bo.c
@@ -59,22 +59,18 @@ struct r600_bo *r600_bo(struct radeon *radeon,
 		}
 	}
 
-	if (binding & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER)) {
+	switch(usage) {
+	case PIPE_USAGE_DYNAMIC:
+	case PIPE_USAGE_STREAM:
+	case PIPE_USAGE_STAGING:
 		initial_domain = RADEON_GEM_DOMAIN_GTT;
-	} else {
-		switch(usage) {
-		case PIPE_USAGE_DYNAMIC:
-		case PIPE_USAGE_STREAM:
-		case PIPE_USAGE_STAGING:
-			initial_domain = RADEON_GEM_DOMAIN_GTT;
-			break;
-		case PIPE_USAGE_DEFAULT:
-		case PIPE_USAGE_STATIC:
-		case PIPE_USAGE_IMMUTABLE:
-		default:
-			initial_domain = RADEON_GEM_DOMAIN_VRAM;
-			break;
-		}
+		break;
+	case PIPE_USAGE_DEFAULT:
+	case PIPE_USAGE_STATIC:
+	case PIPE_USAGE_IMMUTABLE:
+	default:
+		initial_domain = RADEON_GEM_DOMAIN_VRAM;
+		break;
 	}
 	rbo = radeon_bo(radeon, 0, size, alignment, initial_domain);
 	if (rbo == NULL) {
commit e1f88016ec51ccf7e07fac4d77ad9077b6b9a1eb
Author: Mathias Fröhlich <Mathias.Froehlich at gmx.net>
Date:   Sun Jun 12 14:25:26 2011 +0200

    r600g: Set the domains value also for recycled buffer objects.

diff --git a/src/gallium/winsys/r600/drm/r600_bo.c b/src/gallium/winsys/r600/drm/r600_bo.c
index 8bb216d..093660f 100644
--- a/src/gallium/winsys/r600/drm/r600_bo.c
+++ b/src/gallium/winsys/r600/drm/r600_bo.c
@@ -38,11 +38,23 @@ struct r600_bo *r600_bo(struct radeon *radeon,
 {
 	struct r600_bo *bo;
 	struct radeon_bo *rbo;
-	uint32_t initial_domain;
+	uint32_t initial_domain, domains;
 	  
+	/* Staging resources particpate in transfers and blits only
+	 * and are used for uploads and downloads from regular
+	 * resources.  We generate them internally for some transfers.
+	 */
+	if (usage == PIPE_USAGE_STAGING)
+		domains = RADEON_GEM_DOMAIN_CPU | RADEON_GEM_DOMAIN_GTT;
+	else
+		domains = (RADEON_GEM_DOMAIN_CPU |
+				RADEON_GEM_DOMAIN_GTT |
+				RADEON_GEM_DOMAIN_VRAM);
+
 	if (binding & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER)) {
 		bo = r600_bomgr_bo_create(radeon->bomgr, size, alignment, *radeon->cfence);
 		if (bo) {
+			bo->domains = domains;
 			return bo;
 		}
 	}
@@ -72,22 +84,12 @@ struct r600_bo *r600_bo(struct radeon *radeon,
 	bo = calloc(1, sizeof(struct r600_bo));
 	bo->size = size;
 	bo->alignment = alignment;
+	bo->domains = domains;
 	bo->bo = rbo;
 	if (binding & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER)) {
 		r600_bomgr_bo_init(radeon->bomgr, bo);
 	}
 
-	/* Staging resources particpate in transfers and blits only
-	 * and are used for uploads and downloads from regular
-	 * resources.  We generate them internally for some transfers.
-	 */
-	if (usage == PIPE_USAGE_STAGING)
-		bo->domains = RADEON_GEM_DOMAIN_CPU | RADEON_GEM_DOMAIN_GTT;
-	else
-		bo->domains = (RADEON_GEM_DOMAIN_CPU |
-				RADEON_GEM_DOMAIN_GTT |
-				RADEON_GEM_DOMAIN_VRAM);
-
 	pipe_reference_init(&bo->reference, 1);
 	return bo;
 }
commit e2529442e6cc208a4f62ff7dc00d5e2ba7c92624
Author: Mathias Fröhlich <Mathias.Froehlich at web.de>
Date:   Wed Jun 8 17:33:57 2011 +0200

    r600g: Fix typo.
    
    Fix an obvious typo in the yet unused part of the shader setup.

diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 5a1c456..98f5c51 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -1243,7 +1243,7 @@ void r600_init_config(struct r600_pipe_context *rctx)
 	/* SQ_GPR_RESOURCE_MGMT_2 */
 	tmp = 0;
 	tmp |= S_008C08_NUM_GS_GPRS(num_gs_gprs);
-	tmp |= S_008C08_NUM_GS_GPRS(num_es_gprs);
+	tmp |= S_008C08_NUM_ES_GPRS(num_es_gprs);
 	r600_pipe_state_add_reg(rstate, R_008C08_SQ_GPR_RESOURCE_MGMT_2, tmp, 0xFFFFFFFF, NULL);
 
 	/* SQ_THREAD_RESOURCE_MGMT */
commit 92563476e451a7df131822a8bcdedc2c161ed75f
Author: Pierre-Eric Pelloux-Prayer <pelloux at gmail.com>
Date:   Fri Jun 10 15:45:01 2011 +0200

    r600g: remove useless call to u_upload_flush
    
    No regressions found with :
    - piglit (quick.tests)
    - Unigine Heaven
    - Lightsmark
    - openarena
    - Imprudence (Second Life fork)
    
    agd5f Note: this patch was previously reverted due to piglit
    regressions, but I'm not able to reproduce them here.
    See this bug:
    https://bugs.freedesktop.org/show_bug.cgi?id=34008
    and discussion:
    http://lists.freedesktop.org/archives/dri-devel/2011-June/011996.html
    
    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>

diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index f924d79..ce2db88 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -138,11 +138,6 @@ static void r600_flush(struct pipe_context *ctx,
 	dc++;
 #endif
 	r600_context_flush(&rctx->ctx);
-
-	/* XXX This shouldn't be really necessary, but removing it breaks some tests.
-	 * Needless buffer reallocations may significantly increase memory consumption,
-	 * so getting rid of this call is important. */
-	u_upload_flush(rctx->vbuf_mgr->uploader);
 }
 
 static void r600_update_num_contexts(struct r600_screen *rscreen, int diff)
commit 317247390a3af61f2913e4446959975c9ab2478a
Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun Jun 12 23:21:41 2011 +0200

    st/mesa: rebind vertex arrays if _NEW_BUFFER_OBJECT is dirty
    
    This fixes piglit/vbo-bufferdata. It's a regression in 7.11.
    
    Reviewed-by: Brian Paul <brianp at vmware.com>

diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 56955d3..dd26db2 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -650,7 +650,8 @@ st_draw_vbo(struct gl_context *ctx,
    struct pipe_draw_info info;
    unsigned i, num_instances = 1;
    GLboolean new_array =
-         st->dirty.st && (st->dirty.mesa & (_NEW_ARRAY | _NEW_PROGRAM)) != 0;
+      st->dirty.st &&
+      (st->dirty.mesa & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT)) != 0;
 
    /* Mesa core state should have been validated already */
    assert(ctx->NewState == 0x0);
commit b19d86701eb6b04a0b7bcf43af06c4ce4fc30299
Author: Pierre-Eric Pelloux-Prayer <pelloux at gmail.com>
Date:   Fri Jun 10 13:57:21 2011 +0200

    r600g: fixed bo memory leak issue
    
    pipe_resource_reference call was miossing, thus creating massive memory under certain conditions.
    Fix : https://bugs.freedesktop.org/show_bug.cgi?id=37168

diff --git a/src/gallium/drivers/r600/r600_translate.c b/src/gallium/drivers/r600/r600_translate.c
index 7482d15..307fd57 100644
--- a/src/gallium/drivers/r600/r600_translate.c
+++ b/src/gallium/drivers/r600/r600_translate.c
@@ -48,6 +48,7 @@ void r600_translate_index_buffer(struct r600_pipe_context *r600,
 				&r600->context, *index_buffer, 0, *start, count, ptr);
 
 		pipe_resource_reference(index_buffer, out_buffer);
+		pipe_resource_reference(&out_buffer, NULL);
 		*index_size = 2;
 		*start = out_offset / 2;
 		break;
commit 77b7e1b58fcc4823b6b1f4fa4296c810db218f8a
Author: Chia-I Wu <olv at lunarg.com>
Date:   Mon Jun 13 11:41:41 2011 +0800

    mapi: declare x86_entry_start/end static
    
    x86_entry_start and x86_entry_end are defined by the inline assembly.
    Declaring them static saves one instruction in entry_get_public.

diff --git a/src/mapi/mapi/entry_x86_tls.h b/src/mapi/mapi/entry_x86_tls.h
index 5169069..de91812 100644
--- a/src/mapi/mapi/entry_x86_tls.h
+++ b/src/mapi/mapi/entry_x86_tls.h
@@ -86,12 +86,13 @@ __asm__(".text");
 extern unsigned long
 x86_current_tls();
 
+static char x86_entry_start[];
+static char x86_entry_end[];
+
 void
 entry_patch_public(void)
 {
 #ifndef GLX_X86_READONLY_TEXT
-   extern char x86_entry_start[];
-   extern char x86_entry_end[];
    char patch[8] = {
       0x65, 0xa1, 0x00, 0x00, 0x00, 0x00, /* movl %gs:0x0, %eax */
       0x90, 0x90                          /* nop's */
@@ -108,7 +109,6 @@ entry_patch_public(void)
 mapi_func
 entry_get_public(int slot)
 {
-   extern char x86_entry_start[];
    return (mapi_func) (x86_entry_start + slot * 16);
 }
 
diff --git a/src/mapi/mapi/entry_x86_tsd.h b/src/mapi/mapi/entry_x86_tsd.h
index 1491478..c479c19 100644
--- a/src/mapi/mapi/entry_x86_tsd.h
+++ b/src/mapi/mapi/entry_x86_tsd.h
@@ -60,6 +60,9 @@ __asm__(".balign 32\n"
 #include <string.h>
 #include "u_execmem.h"
 
+static const char x86_entry_start[];
+static const char x86_entry_end[];
+
 void
 entry_patch_public(void)
 {
@@ -68,7 +71,6 @@ entry_patch_public(void)
 mapi_func
 entry_get_public(int slot)
 {
-   extern const char x86_entry_start[];
    return (mapi_func) (x86_entry_start + slot * X86_ENTRY_SIZE);
 }
 
@@ -84,7 +86,6 @@ entry_patch(mapi_func entry, int slot)
 mapi_func
 entry_generate(int slot)
 {
-   extern const char x86_entry_end[];
    const char *code_templ = x86_entry_end - X86_ENTRY_SIZE;
    void *code;
    mapi_func entry;
commit 3e1caf5d2666ed220f4a740db4fe5a7ad54e455a
Author: Benjamin Franzke <benjaminfranzke at googlemail.com>
Date:   Wed Jun 8 15:50:25 2011 +0200

    mapi: Fix tls with shared/es-glapi on x86-64
    
    x86_64_entry_start needs to be declared static in the C code,
    in order to have the correct address in entry_get_public
    (seems not to be needed on x86).
    
    The compiler needs to lookup a local not a global object.
    
    Otherwise addresses needed for _glapi_proc_address will be computed
    from some random offset (0x6400229a61058b48 in my case).

diff --git a/src/mapi/mapi/entry_x86-64_tls.h b/src/mapi/mapi/entry_x86-64_tls.h
index d3b606c..72d4125 100644
--- a/src/mapi/mapi/entry_x86-64_tls.h
+++ b/src/mapi/mapi/entry_x86-64_tls.h
@@ -76,10 +76,12 @@ entry_patch_public(void)
 {
 }
 
+static char
+x86_64_entry_start[];
+
 mapi_func
 entry_get_public(int slot)
 {
-   extern char x86_64_entry_start[];
    return (mapi_func) (x86_64_entry_start + slot * 32);
 }
 
commit 982cb365848ebb7e64dc0915e37793e5823e4bbf
Author: Chia-I Wu <olv at lunarg.com>
Date:   Mon Jun 13 11:35:21 2011 +0800

    wayland-drm: remove depend on "make clean"

diff --git a/src/egl/wayland/wayland-drm/Makefile b/src/egl/wayland/wayland-drm/Makefile
index 789b020..bc010b6 100644
--- a/src/egl/wayland/wayland-drm/Makefile
+++ b/src/egl/wayland/wayland-drm/Makefile
@@ -34,6 +34,7 @@ depend:
 clean:
 	rm -rf libwayland-drm.a $(wayland_drm_OBJECTS) \
 		$(GEN_SOURCES) $(GEN_HEADERS)
+	rm -f depend depend.bak
 
 install:
 	@echo -n ""
commit 77e031a1c423affde99934f0fd059d49852e2729
Author: Chia-I Wu <olv at lunarg.com>
Date:   Wed Jun 8 16:33:56 2011 +0800

    egl_dri2: try swrastg_dri if swrast_dri fails
    
    Per libGL.

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index a38bff5..d430145 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -416,6 +416,12 @@ dri2_load_driver_swrast(_EGLDisplay *disp)
 
    dri2_dpy->driver_name = "swrast";
    extensions = dri2_open_driver(disp);
+   if (!extensions) {
+      /* try again with swrastg */
+      dri2_dpy->driver_name = "swrastg";
+      extensions = dri2_open_driver(disp);
+   }
+
    if (!extensions)
       return EGL_FALSE;
 
commit cf69eeacc6931e833e7894a379af4fae085881e9
Author: Chia-I Wu <olv at lunarg.com>
Date:   Wed Jun 8 16:33:55 2011 +0800

    egl_dri2: add dri2_load_driver_swrast
    
    Refactor dri2_load_driver and add dri2_load_driver_swrast for loading
    swrast DRI driver.

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 3d5827e..a38bff5 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -334,8 +334,8 @@ dri2_bind_extensions(struct dri2_egl_display *dri2_dpy,
    return ret;
 }
 
-EGLBoolean
-dri2_load_driver(_EGLDisplay *disp)
+static const __DRIextension **
+dri2_open_driver(_EGLDisplay *disp)
 {
    struct dri2_egl_display *dri2_dpy = disp->DriverData;
    const __DRIextension **extensions;
@@ -374,9 +374,9 @@ dri2_load_driver(_EGLDisplay *disp)
 
    if (dri2_dpy->driver == NULL) {
       _eglLog(_EGL_WARNING,
-	      "DRI2: failed to open any driver (search paths %s)",
-	      search_paths);
-      return EGL_FALSE;
+	      "DRI2: failed to open %s (search paths %s)",
+	      dri2_dpy->driver_name, search_paths);
+      return NULL;
    }
 
    _eglLog(_EGL_DEBUG, "DRI2: dlopen(%s)", path);
@@ -385,20 +385,44 @@ dri2_load_driver(_EGLDisplay *disp)
       _eglLog(_EGL_WARNING,
 	      "DRI2: driver exports no extensions (%s)", dlerror());
       dlclose(dri2_dpy->driver);
+   }
+
+   return extensions;
+}
+
+EGLBoolean
+dri2_load_driver(_EGLDisplay *disp)
+{
+   struct dri2_egl_display *dri2_dpy = disp->DriverData;
+   const __DRIextension **extensions;
+
+   extensions = dri2_open_driver(disp);
+   if (!extensions)
+      return EGL_FALSE;
+
+   if (!dri2_bind_extensions(dri2_dpy, dri2_driver_extensions, extensions)) {
+      dlclose(dri2_dpy->driver);
       return EGL_FALSE;
    }
 
-   if (strcmp(dri2_dpy->driver_name, "swrast") == 0) {
-      if (!dri2_bind_extensions(dri2_dpy, swrast_driver_extensions, extensions)) {
-         dlclose(dri2_dpy->driver);
-         return EGL_FALSE;
-      }
-   } else {
-      if (!dri2_bind_extensions(dri2_dpy, dri2_driver_extensions, extensions)) {
-         dlclose(dri2_dpy->driver);
-         return EGL_FALSE;
-      }
-   } 
+   return EGL_TRUE;
+}
+
+EGLBoolean
+dri2_load_driver_swrast(_EGLDisplay *disp)
+{
+   struct dri2_egl_display *dri2_dpy = disp->DriverData;
+   const __DRIextension **extensions;
+
+   dri2_dpy->driver_name = "swrast";
+   extensions = dri2_open_driver(disp);
+   if (!extensions)
+      return EGL_FALSE;
+
+   if (!dri2_bind_extensions(dri2_dpy, swrast_driver_extensions, extensions)) {
+      dlclose(dri2_dpy->driver);
+      return EGL_FALSE;
+   }
 
    return EGL_TRUE;
 }
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index 97f541b..dd9eb94 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -183,6 +183,9 @@ EGLBoolean
 dri2_load_driver(_EGLDisplay *disp);
 
 EGLBoolean
+dri2_load_driver_swrast(_EGLDisplay *disp);
+
+EGLBoolean
 dri2_create_screen(_EGLDisplay *disp);
 
 struct dri2_egl_config *
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 2e26ff0..8bff294 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -906,9 +906,7 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
       goto cleanup_dpy;
    }
 
-   dri2_dpy->driver_name = dri2_strndup("swrast", strlen("swrast"));
-
-   if (!dri2_load_driver(disp))
+   if (!dri2_load_driver_swrast(disp))
       goto cleanup_conn;
 
    dri2_dpy->swrast_loader_extension.base.name = __DRI_SWRAST_LOADER;


More information about the Xquartz-changes mailing list