glx: Rename __GLXcontext and __GLXdisplayPrivate to struct types.
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 28 Jul 2010 15:16:00 +0000 (11:16 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 28 Jul 2010 20:45:25 +0000 (16:45 -0400)
30 files changed:
src/glx/apple/glxreply.c
src/glx/clientattrib.c
src/glx/dri2.c
src/glx/dri2_glx.c
src/glx/dri_glx.c
src/glx/drisw_glx.c
src/glx/glx_pbuffer.c
src/glx/glxclient.h
src/glx/glxcmds.c
src/glx/glxcurrent.c
src/glx/glxext.c
src/glx/glxextensions.c
src/glx/glxextensions.h
src/glx/indirect.c
src/glx/indirect.h
src/glx/indirect_init.c
src/glx/indirect_init.h
src/glx/indirect_vertex_array.c
src/glx/indirect_vertex_program.c
src/glx/packrender.h
src/glx/packsingle.h
src/glx/pixel.c
src/glx/pixelstore.c
src/glx/renderpix.c
src/glx/single2.c
src/glx/singlepix.c
src/glx/vertarr.c
src/glx/xfont.c
src/mapi/glapi/gen/glX_proto_recv.py
src/mapi/glapi/gen/glX_proto_send.py

index 7280bc9..f17ebe6 100644 (file)
@@ -55,7 +55,7 @@ __glXReadReply(Display * dpy, size_t size, void *dest,
 }
 
 void
-__glXReadPixelReply(Display * dpy, __GLXcontext * gc, unsigned max_dim,
+__glXReadPixelReply(Display * dpy, struct glx_context * gc, unsigned max_dim,
                     GLint width, GLint height, GLint depth, GLenum format,
                     GLenum type, void *dest, GLboolean dimensions_in_reply)
 {
@@ -101,7 +101,7 @@ __glXReadPixelReply(Display * dpy, __GLXcontext * gc, unsigned max_dim,
 
 #if 0
 GLubyte *
-__glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen)
+__glXSetupSingleRequest(struct glx_context * gc, GLint sop, GLint cmdlen)
 {
    xGLXSingleReq *req;
    Display *const dpy = gc->currentDpy;
@@ -117,7 +117,7 @@ __glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen)
 #endif
 
 GLubyte *
-__glXSetupVendorRequest(__GLXcontext * gc, GLint code, GLint vop,
+__glXSetupVendorRequest(struct glx_context * gc, GLint code, GLint vop,
                         GLint cmdlen)
 {
    xGLXVendorPrivateReq *req;
index b26c179..7792fa3 100644 (file)
@@ -39,7 +39,7 @@
 static void
 do_enable_disable(GLenum array, GLboolean val)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    unsigned index = 0;
 
@@ -69,7 +69,7 @@ __indirect_glDisableClientState(GLenum array)
 void
 __indirect_glPushClientAttrib(GLuint mask)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    __GLXattribute **spp = gc->attributes.stackPointer, *sp;
 
@@ -97,7 +97,7 @@ __indirect_glPushClientAttrib(GLuint mask)
 void
 __indirect_glPopClientAttrib(void)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    __GLXattribute **spp = gc->attributes.stackPointer, *sp;
    GLuint mask;
@@ -127,7 +127,7 @@ __indirect_glPopClientAttrib(void)
 #endif
 
 void
-__glFreeAttributeState(__GLXcontext * gc)
+__glFreeAttributeState(struct glx_context * gc)
 {
    __GLXattribute *sp, **spp;
 
index f288ab8..d70ec5a 100644 (file)
@@ -99,7 +99,7 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
       GLXBufferSwapComplete *aevent = (GLXBufferSwapComplete *)event;
       xDRI2BufferSwapComplete *awire = (xDRI2BufferSwapComplete *)wire;
       __GLXDRIdrawable *pdraw;
-      __GLXdisplayPrivate *glx_dpy = __glXInitialize(dpy);
+      struct glx_display *glx_dpy = __glXInitialize(dpy);
 
       /* Ignore swap events if we're not looking for them */
       pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, awire->drawable);
index 6bd5d36..8ad0e33 100644 (file)
@@ -94,7 +94,7 @@ struct dri2_screen {
 
 struct dri2_context
 {
-   __GLXcontext base;
+   struct glx_context base;
    __GLXDRIcontext dri_vtable;
    __DRIcontext *driContext;
 };
@@ -114,7 +114,7 @@ struct dri2_drawable
 static const struct glx_context_vtable dri2_context_vtable;
 
 static void
-dri2_destroy_context(__GLXcontext *context)
+dri2_destroy_context(struct glx_context *context)
 {
    struct dri2_context *pcp = (struct dri2_context *) context;
    struct dri2_screen *psc = (struct dri2_screen *) context->psc;
@@ -133,7 +133,7 @@ dri2_destroy_context(__GLXcontext *context)
 }
 
 static Bool
-dri2BindContext(__GLXcontext *context,
+dri2BindContext(struct glx_context *context,
                __GLXDRIdrawable *draw, __GLXDRIdrawable *read)
 {
    struct dri2_context *pcp = (struct dri2_context *) context;
@@ -146,7 +146,7 @@ dri2BindContext(__GLXcontext *context,
 }
 
 static void
-dri2UnbindContext(__GLXcontext *context)
+dri2UnbindContext(struct glx_context *context)
 {
    struct dri2_context *pcp = (struct dri2_context *) context;
    struct dri2_screen *psc = (struct dri2_screen *) pcp->base.psc;
@@ -154,10 +154,10 @@ dri2UnbindContext(__GLXcontext *context)
    (*psc->core->unbindContext) (pcp->driContext);
 }
 
-static __GLXcontext *
+static struct glx_context *
 dri2_create_context(struct glx_screen *base,
                    struct glx_config *config_base,
-                   GLXContext shareList, int renderType)
+                   struct glx_context *shareList, int renderType)
 {
    struct dri2_context *pcp, *pcp_shared;
    struct dri2_screen *psc = (struct dri2_screen *) base;
@@ -201,7 +201,7 @@ dri2DestroyDrawable(__GLXDRIdrawable *base)
 {
    struct dri2_screen *psc = (struct dri2_screen *) base->psc;
    struct dri2_drawable *pdraw = (struct dri2_drawable *) base;
-   __GLXdisplayPrivate *dpyPriv = psc->base.display;
+   struct glx_display *dpyPriv = psc->base.display;
    struct dri2_display *pdp = (struct dri2_display *)dpyPriv->dri2Display;
 
    __glxHashDelete(pdp->dri2Hash, pdraw->base.xDrawable);
@@ -217,7 +217,7 @@ dri2CreateDrawable(struct glx_screen *base, XID xDrawable,
    struct dri2_drawable *pdraw;
    struct dri2_screen *psc = (struct dri2_screen *) base;
    __GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) config_base;
-   __GLXdisplayPrivate *dpyPriv;
+   struct glx_display *dpyPriv;
    struct dri2_display *pdp;
    GLint vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1;
 
@@ -402,7 +402,7 @@ dri2_copy_drawable(struct dri2_drawable *priv, int dest, int src)
 }
 
 static void
-dri2_wait_x(__GLXcontext *gc)
+dri2_wait_x(struct glx_context *gc)
 {
    struct dri2_drawable *priv = (struct dri2_drawable *)
       GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
@@ -414,7 +414,7 @@ dri2_wait_x(__GLXcontext *gc)
 }
 
 static void
-dri2_wait_gl(__GLXcontext *gc)
+dri2_wait_gl(struct glx_context *gc)
 {
    struct dri2_drawable *priv = (struct dri2_drawable *)
       GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
@@ -429,9 +429,9 @@ static void
 dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
 {
    struct dri2_drawable *pdraw = loaderPrivate;
-   __GLXdisplayPrivate *priv = __glXInitialize(pdraw->base.psc->dpy);
+   struct glx_display *priv = __glXInitialize(pdraw->base.psc->dpy);
    struct dri2_display *pdp = (struct dri2_display *)priv->dri2Display;
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
 
    /* Old servers don't send invalidate events */
    if (!pdp->invalidateAvailable)
@@ -490,7 +490,7 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
                int64_t remainder)
 {
     struct dri2_drawable *priv = (struct dri2_drawable *) pdraw;
-    __GLXdisplayPrivate *dpyPriv = __glXInitialize(priv->base.psc->dpy);
+    struct glx_display *dpyPriv = __glXInitialize(priv->base.psc->dpy);
     struct dri2_screen *psc = (struct dri2_screen *) priv->base.psc;
     struct dri2_display *pdp =
        (struct dri2_display *)dpyPriv->dri2Display;
@@ -646,10 +646,10 @@ dri2_bind_tex_image(Display * dpy,
                    GLXDrawable drawable,
                    int buffer, const int *attrib_list)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    struct dri2_context *pcp = (struct dri2_context *) gc;
    __GLXDRIdrawable *base = GetGLXDRIDrawable(dpy, drawable);
-   __GLXdisplayPrivate *dpyPriv = __glXInitialize(dpy);
+   struct glx_display *dpyPriv = __glXInitialize(dpy);
    struct dri2_drawable *pdraw = (struct dri2_drawable *) base;
    struct dri2_display *pdp =
       (struct dri2_display *) dpyPriv->dri2Display;
@@ -725,7 +725,7 @@ static const struct glx_screen_vtable dri2_screen_vtable = {
 };
 
 static struct glx_screen *
-dri2CreateScreen(int screen, __GLXdisplayPrivate * priv)
+dri2CreateScreen(int screen, struct glx_display * priv)
 {
    const __DRIconfig **driver_configs;
    const __DRIextension **extensions;
@@ -876,7 +876,7 @@ dri2DestroyDisplay(__GLXDRIdisplay * dpy)
 _X_HIDDEN __GLXDRIdrawable *
 dri2GetGlxDrawableFromXDrawableId(Display *dpy, XID id)
 {
-   __GLXdisplayPrivate *d = __glXInitialize(dpy);
+   struct glx_display *d = __glXInitialize(dpy);
    struct dri2_display *pdp = (struct dri2_display *) d->dri2Display;
    __GLXDRIdrawable *pdraw;
 
index b487f41..70281f6 100644 (file)
@@ -78,7 +78,7 @@ struct dri_screen
 
 struct dri_context
 {
-   __GLXcontext base;
+   struct glx_context base;
    __GLXDRIcontext dri_vtable;
    __DRIcontext *driContext;
    XID hwContextID;
@@ -499,7 +499,7 @@ CallCreateNewScreen(Display *dpy, int scrn, struct dri_screen *psc,
 }
 
 static void
-dri_destroy_context(__GLXcontext * context)
+dri_destroy_context(struct glx_context * context)
 {
    struct dri_context *pcp = (struct dri_context *) context;
    struct dri_screen *psc = (struct dri_screen *) context->psc;
@@ -519,7 +519,7 @@ dri_destroy_context(__GLXcontext * context)
 }
 
 static Bool
-driBindContext(__GLXcontext *context,
+driBindContext(struct glx_context *context,
               __GLXDRIdrawable *draw, __GLXDRIdrawable *read)
 {
    struct dri_context *pcp = (struct dri_context *) context;
@@ -532,7 +532,7 @@ driBindContext(__GLXcontext *context,
 }
 
 static void
-driUnbindContext(__GLXcontext * context)
+driUnbindContext(struct glx_context * context)
 {
    struct dri_context *pcp = (struct dri_context *) context;
    struct dri_screen *psc = (struct dri_screen *) pcp->base.psc;
@@ -549,10 +549,10 @@ static const struct glx_context_vtable dri_context_vtable = {
    NULL,
 };
 
-static __GLXcontext *
+static struct glx_context *
 dri_create_context(struct glx_screen *base,
                   struct glx_config *config_base,
-                  GLXContext shareList, int renderType)
+                  struct glx_context *shareList, int renderType)
 {
    struct dri_context *pcp, *pcp_shared;
    struct dri_screen *psc = (struct dri_screen *) base;
@@ -756,7 +756,7 @@ driWaitForSBC(__GLXDRIdrawable *pdraw, int64_t target_sbc, int64_t *ust,
 static int
 driSetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    struct dri_drawable *pdp = (struct dri_drawable *) pdraw;
    struct dri_screen *psc;
 
@@ -775,7 +775,7 @@ driSetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
 static int
 driGetSwapInterval(__GLXDRIdrawable *pdraw)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    struct dri_drawable *pdp = (struct dri_drawable *) pdraw;
    struct dri_screen *psc;
 
@@ -827,7 +827,7 @@ static const struct glx_screen_vtable dri_screen_vtable = {
 };
 
 static struct glx_screen *
-driCreateScreen(int screen, __GLXdisplayPrivate *priv)
+driCreateScreen(int screen, struct glx_display *priv)
 {
    struct dri_display *pdp;
    __GLXDRIscreen *psp;
index 9d4bee9..070c9d6 100644 (file)
@@ -35,7 +35,7 @@ struct drisw_display
 
 struct drisw_context
 {
-   __GLXcontext base;
+   struct glx_context base;
    __GLXDRIcontext dri_vtable;
    __DRIcontext *driContext;
 
@@ -240,7 +240,7 @@ static const __DRIextension *loader_extensions[] = {
  */
 
 static void
-drisw_destroy_context(__GLXcontext *context)
+drisw_destroy_context(struct glx_context *context)
 {
    struct drisw_context *pcp = (struct drisw_context *) context;
    struct drisw_screen *psc = (struct drisw_screen *) context->psc;
@@ -259,7 +259,7 @@ drisw_destroy_context(__GLXcontext *context)
 }
 
 static Bool
-driBindContext(__GLXcontext * context,
+driBindContext(struct glx_context * context,
               __GLXDRIdrawable * draw, __GLXDRIdrawable * read)
 {
    struct drisw_context *pcp = (struct drisw_context *) context;
@@ -272,7 +272,7 @@ driBindContext(__GLXcontext * context,
 }
 
 static void
-driUnbindContext(__GLXcontext * context)
+driUnbindContext(struct glx_context * context)
 {
    struct drisw_context *pcp = (struct drisw_context *) context;
    struct drisw_screen *psc = (struct drisw_screen *) pcp->base.psc;
@@ -289,10 +289,10 @@ static const struct glx_context_vtable drisw_context_vtable = {
    NULL,
 };
 
-static __GLXcontext *
+static struct glx_context *
 drisw_create_context(struct glx_screen *base,
                     struct glx_config *config_base,
-                    GLXContext shareList, int renderType)
+                    struct glx_context *shareList, int renderType)
 {
    struct drisw_context *pcp, *pcp_shared;
    __GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) config_base;
@@ -433,7 +433,7 @@ static const struct glx_screen_vtable drisw_screen_vtable = {
 };
 
 static struct glx_screen *
-driCreateScreen(int screen, __GLXdisplayPrivate *priv)
+driCreateScreen(int screen, struct glx_display *priv)
 {
    __GLXDRIscreen *psp;
    const __DRIconfig **driver_configs;
index bc2f1cc..15bfb15 100644 (file)
@@ -57,7 +57,7 @@
 static void
 warn_GLX_1_3(Display * dpy, const char *function_name)
 {
-   __GLXdisplayPrivate *priv = __glXInitialize(dpy);
+   struct glx_display *priv = __glXInitialize(dpy);
 
    if (priv->minorVersion < 3) {
       fprintf(stderr,
@@ -85,7 +85,7 @@ static void
 ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
                         const CARD32 * attribs, size_t num_attribs)
 {
-   __GLXdisplayPrivate *priv = __glXInitialize(dpy);
+   struct glx_display *priv = __glXInitialize(dpy);
    __GLXDRIdrawable *pdraw;
    CARD32 *output;
    CARD8 opcode;
@@ -187,7 +187,7 @@ CreateDRIDrawable(Display *dpy, struct glx_config *config,
                  XID drawable, XID glxdrawable,
                  const int *attrib_list, size_t num_attribs)
 {
-   __GLXdisplayPrivate *const priv = __glXInitialize(dpy);
+   struct glx_display *const priv = __glXInitialize(dpy);
    __GLXDRIdrawable *pdraw;
    struct glx_screen *psc;
 
@@ -214,7 +214,7 @@ CreateDRIDrawable(Display *dpy, struct glx_config *config,
 static void
 DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable)
 {
-   __GLXdisplayPrivate *const priv = __glXInitialize(dpy);
+   struct glx_display *const priv = __glXInitialize(dpy);
    __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
 
    if (pdraw != NULL) {
@@ -263,7 +263,7 @@ static int
 GetDrawableAttribute(Display * dpy, GLXDrawable drawable,
                      int attribute, unsigned int *value)
 {
-   __GLXdisplayPrivate *priv;
+   struct glx_display *priv;
    xGLXGetDrawableAttributesReply reply;
    CARD32 *data;
    CARD8 opcode;
@@ -461,7 +461,7 @@ CreatePbuffer(Display * dpy, struct glx_config *config,
               unsigned int width, unsigned int height,
               const int *attrib_list, GLboolean size_in_attribs)
 {
-   __GLXdisplayPrivate *priv = __glXInitialize(dpy);
+   struct glx_display *priv = __glXInitialize(dpy);
    GLXDrawable id = 0;
    CARD32 *data;
    CARD8 opcode;
@@ -547,7 +547,7 @@ CreatePbuffer(Display * dpy, struct glx_config *config,
 static void
 DestroyPbuffer(Display * dpy, GLXDrawable drawable)
 {
-   __GLXdisplayPrivate *priv = __glXInitialize(dpy);
+   struct glx_display *priv = __glXInitialize(dpy);
    CARD8 opcode;
 
    if ((dpy == NULL) || (drawable == 0)) {
index bde454b..4f5c02f 100644 (file)
 
 #define __GLX_MAX_TEXTURE_UNITS 32
 
-typedef struct __GLXcontextRec __GLXcontext;
-typedef struct __GLXdrawableRec __GLXdrawable;
-typedef struct __GLXdisplayPrivateRec __GLXdisplayPrivate;
-typedef struct _glapi_table __GLapi;
+struct glx_display;
+struct glx_context;
 
 /************************************************************************/
 
 #ifdef GLX_DIRECT_RENDERING
 
-extern void DRI_glXUseXFont(GLXContext CC,
+extern void DRI_glXUseXFont(struct glx_context *ctx,
                            Font font, int first, int count, int listbase);
 
 #endif
@@ -101,16 +99,17 @@ struct __GLXDRIdisplayRec
      */
    void (*destroyDisplay) (__GLXDRIdisplay * display);
 
-   struct glx_screen *(*createScreen)(int screen, __GLXdisplayPrivate * priv);
+   struct glx_screen *(*createScreen)(int screen, struct glx_display * priv);
 };
 
 struct __GLXDRIscreenRec {
 
    void (*destroyScreen)(struct glx_screen *psc);
 
-   __GLXcontext *(*createContext)(struct glx_screen *psc,
-                                 struct glx_config *config,
-                                 GLXContext shareList, int renderType);
+   struct glx_context *(*createContext)(struct glx_screen *psc,
+                                       struct glx_config *config,
+                                       struct glx_context *shareList,
+                                       int renderType);
 
    __GLXDRIdrawable *(*createDrawable)(struct glx_screen *psc,
                                       XID drawable,
@@ -134,9 +133,9 @@ struct __GLXDRIscreenRec {
 
 struct __GLXDRIcontextRec
 {
-   Bool(*bindContext) (__GLXcontext *context, __GLXDRIdrawable *pdraw,
+   Bool(*bindContext) (struct glx_context *context, __GLXDRIdrawable *pdraw,
                       __GLXDRIdrawable *pread);
-   void (*unbindContext) (__GLXcontext *context);
+   void (*unbindContext) (struct glx_context *context);
 };
 
 struct __GLXDRIdrawableRec
@@ -221,10 +220,10 @@ typedef struct __GLXattributeMachineRec
 } __GLXattributeMachine;
 
 struct glx_context_vtable {
-   void (*destroy)(__GLXcontext *ctx);
-   void (*wait_gl)(__GLXcontext *ctx);
-   void (*wait_x)(__GLXcontext *ctx);
-   void (*use_x_font)(__GLXcontext *ctx,
+   void (*destroy)(struct glx_context *ctx);
+   void (*wait_gl)(struct glx_context *ctx);
+   void (*wait_x)(struct glx_context *ctx);
+   void (*use_x_font)(struct glx_context *ctx,
                      Font font, int first, int count, int listBase);
    void (*bind_tex_image)(Display * dpy,
                          GLXDrawable drawable,
@@ -240,7 +239,7 @@ glx_send_destroy_context(Display *dpy, XID xid);
  * GLX state that needs to be kept on the client.  One of these records
  * exist for each context that has been made current by this client.
  */
-struct __GLXcontextRec
+struct glx_context
 {
     /**
      * \name Drawing command buffer.
@@ -326,7 +325,7 @@ struct __GLXcontextRec
      * Fill newImage with the unpacked form of \c oldImage getting it
      * ready for transport to the server.
      */
-   void (*fillImage) (__GLXcontext *, GLint, GLint, GLint, GLint, GLenum,
+   void (*fillImage) (struct glx_context *, GLint, GLint, GLint, GLint, GLenum,
                       GLenum, const GLvoid *, GLubyte *, GLubyte *);
 
     /**
@@ -443,7 +442,7 @@ struct __GLXcontextRec
 };
 
 extern Bool
-glx_context_init(__GLXcontext *gc,
+glx_context_init(struct glx_context *gc,
                 struct glx_screen *psc, struct glx_config *fbconfig);
 
 #define __glXSetError(gc,code)  \
@@ -451,7 +450,7 @@ glx_context_init(__GLXcontext *gc,
       (gc)->error = code;       \
    }
 
-extern void __glFreeAttributeState(__GLXcontext *);
+extern void __glFreeAttributeState(struct glx_context *);
 
 /************************************************************************/
 
@@ -486,9 +485,10 @@ extern void __glFreeAttributeState(__GLXcontext *);
  * a pointer to the config data for that screen (if the screen supports GL).
  */
 struct glx_screen_vtable {
-   __GLXcontext *(*create_context)(struct glx_screen *psc,
-                                  struct glx_config *config,
-                                  GLXContext shareList, int renderType);
+   struct glx_context *(*create_context)(struct glx_screen *psc,
+                                        struct glx_config *config,
+                                        struct glx_context *shareList,
+                                        int renderType);
 };
 
 struct glx_screen
@@ -506,7 +506,7 @@ struct glx_screen
      */
    char *effectiveGLXexts;
 
-   __GLXdisplayPrivate *display;
+   struct glx_display *display;
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     /**
@@ -541,11 +541,11 @@ struct glx_screen
  * Per display private data.  One of these records exists for each display
  * that is using the OpenGL (GLX) extension.
  */
-struct __GLXdisplayPrivateRec
+struct glx_display
 {
    /* The extension protocol codes */
    XExtCodes *codes;
-   struct __GLXdisplayPrivateRec *next;
+   struct glx_display *next;
 
     /**
      * Back pointer to the display
@@ -599,24 +599,24 @@ struct __GLXdisplayPrivateRec
 
 extern int
 glx_screen_init(struct glx_screen *psc,
-               int screen, __GLXdisplayPrivate * priv);
+               int screen, struct glx_display * priv);
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
 extern __GLXDRIdrawable *
 dri2GetGlxDrawableFromXDrawableId(Display *dpy, XID id);
 #endif
 
-extern GLubyte *__glXFlushRenderBuffer(__GLXcontext *, GLubyte *);
+extern GLubyte *__glXFlushRenderBuffer(struct glx_context *, GLubyte *);
 
-extern void __glXSendLargeChunk(__GLXcontext * gc, GLint requestNumber,
+extern void __glXSendLargeChunk(struct glx_context * gc, GLint requestNumber,
                                 GLint totalRequests,
                                 const GLvoid * data, GLint dataLen);
 
-extern void __glXSendLargeCommand(__GLXcontext *, const GLvoid *, GLint,
+extern void __glXSendLargeCommand(struct glx_context *, const GLvoid *, GLint,
                                   const GLvoid *, GLint);
 
 /* Initialize the GLX extension for dpy */
-extern __GLXdisplayPrivate *__glXInitialize(Display *);
+extern struct glx_display *__glXInitialize(Display *);
 
 extern void __glXPreferEGL(int state);
 
@@ -627,7 +627,7 @@ extern int __glXDebug;
 /* This is per-thread storage in an MT environment */
 #if defined( PTHREADS )
 
-extern void __glXSetCurrentContext(__GLXcontext * c);
+extern void __glXSetCurrentContext(struct glx_context * c);
 
 # if defined( GLX_USE_TLS )
 
@@ -638,13 +638,13 @@ extern __thread void *__glX_tls_Context
 
 # else
 
-extern __GLXcontext *__glXGetCurrentContext(void);
+extern struct glx_context *__glXGetCurrentContext(void);
 
 # endif /* defined( GLX_USE_TLS ) */
 
 #else
 
-extern __GLXcontext *__glXcurrentContext;
+extern struct glx_context *__glXcurrentContext;
 #define __glXGetCurrentContext() __glXcurrentContext
 #define __glXSetCurrentContext(gc) __glXcurrentContext = gc
 
@@ -680,7 +680,7 @@ extern CARD8 __glXSetupForCommand(Display * dpy);
 extern const GLuint __glXDefaultPixelStore[9];
 
 /* Send an image to the server using RenderLarge. */
-extern void __glXSendLargeImage(__GLXcontext * gc, GLint compsize, GLint dim,
+extern void __glXSendLargeImage(struct glx_context * gc, GLint compsize, GLint dim,
                                 GLint width, GLint height, GLint depth,
                                 GLenum format, GLenum type,
                                 const GLvoid * src, GLubyte * pc,
@@ -704,7 +704,7 @@ extern GLint __glBytesPerElement(GLenum type);
 ** updated to contain the modes needed by the server to decode the
 ** sent data.
 */
-extern void __glFillImage(__GLXcontext *, GLint, GLint, GLint, GLint, GLenum,
+extern void __glFillImage(struct glx_context *, GLint, GLint, GLint, GLint, GLenum,
                           GLenum, const GLvoid *, GLubyte *, GLubyte *);
 
 /* Copy map data with a stride into a packed buffer */
@@ -719,15 +719,15 @@ extern void __glFillMap2d(GLint, GLint, GLint, GLint, GLint,
 ** Empty an image out of the reply buffer into the clients memory applying
 ** the pack modes to pack back into the clients requested format.
 */
-extern void __glEmptyImage(__GLXcontext *, GLint, GLint, GLint, GLint, GLenum,
+extern void __glEmptyImage(struct glx_context *, GLint, GLint, GLint, GLint, GLenum,
                            GLenum, const GLubyte *, GLvoid *);
 
 
 /*
 ** Allocate and Initialize Vertex Array client state, and free.
 */
-extern void __glXInitVertexArrayState(__GLXcontext *);
-extern void __glXFreeVertexArrayState(__GLXcontext *);
+extern void __glXInitVertexArrayState(struct glx_context *);
+extern void __glXFreeVertexArrayState(struct glx_context *);
 
 /*
 ** Inform the Server of the major and minor numbers and of the client
@@ -789,6 +789,6 @@ GetGLXDRIDrawable(Display *dpy, GLXDrawable drawable);
 #endif
 
 extern struct glx_screen *
-indirect_create_screen(int screen, __GLXdisplayPrivate * priv);
+indirect_create_screen(int screen, struct glx_display * priv);
 
 #endif /* !__GLX_client_h__ */
index f418ef4..f2081fd 100644 (file)
@@ -89,7 +89,7 @@ GarbageCollectDRIDrawables(struct glx_screen * sc)
 {
    XID draw;
    __GLXDRIdrawable *pdraw;
-   __GLXdisplayPrivate *priv = sc->display;
+   struct glx_display *priv = sc->display;
    XWindowAttributes xwa;
    int (*oldXErrorHandler) (Display *, XErrorEvent *);
 
@@ -127,7 +127,7 @@ GarbageCollectDRIDrawables(struct glx_screen * sc)
 _X_HIDDEN __GLXDRIdrawable *
 GetGLXDRIDrawable(Display * dpy, GLXDrawable drawable)
 {
-   __GLXdisplayPrivate *priv = __glXInitialize(dpy);
+   struct glx_display *priv = __glXInitialize(dpy);
    __GLXDRIdrawable *pdraw;
 
    if (priv == NULL)
@@ -159,7 +159,7 @@ GetGLXDRIDrawable(Display * dpy, GLXDrawable drawable)
 static struct glx_screen *
 GetGLXScreenConfigs(Display * dpy, int scrn)
 {
-   __GLXdisplayPrivate *const priv = __glXInitialize(dpy);
+   struct glx_display *const priv = __glXInitialize(dpy);
 
    return (priv
            && priv->screens !=
@@ -168,7 +168,7 @@ GetGLXScreenConfigs(Display * dpy, int scrn)
 
 
 static int
-GetGLXPrivScreenConfig(Display * dpy, int scrn, __GLXdisplayPrivate ** ppriv,
+GetGLXPrivScreenConfig(Display * dpy, int scrn, struct glx_display ** ppriv,
                        struct glx_screen ** ppsc)
 {
    /* Initialize the extension, if needed .  This has the added value
@@ -213,7 +213,7 @@ GetGLXPrivScreenConfig(Display * dpy, int scrn, __GLXdisplayPrivate ** ppriv,
 static struct glx_config *
 ValidateGLXFBConfig(Display * dpy, GLXFBConfig fbconfig)
 {
-   __GLXdisplayPrivate *const priv = __glXInitialize(dpy);
+   struct glx_display *const priv = __glXInitialize(dpy);
    int num_screens = ScreenCount(dpy);
    unsigned i;
    struct glx_config *config;
@@ -236,17 +236,17 @@ ValidateGLXFBConfig(Display * dpy, GLXFBConfig fbconfig)
 
 static const struct glx_context_vtable applegl_context_vtable;
 
-static __GLcontext *
+static struct glx_context *
 applegl_create_context(struct glx_screen *psc,
                       struct glx_config *mode,
-                      GLXContext shareList, int renderType)
+                      struct glx_context *shareList, int renderType)
 {
-   __GLXcontext *gc;
+   struct glx_context *gc;
    int errorcode;
    bool x11error;
 
    /* TODO: Integrate this with apple_glx_create_context and make
-    * struct apple_glx_context inherit from __GLXcontext. */
+    * struct apple_glx_context inherit from struct glx_context. */
 
    gc = Xmalloc(sizeof *gc);
    if (pcp == NULL)
@@ -292,12 +292,12 @@ applegl_create_context(struct glx_screen *psc,
  * function called \c __glXAllocateClientState that allocates the memory and
  * does all the initialization (including the pixel pack / unpack).
  */
-static GLXContext
+static struct glx_context *
 indirect_create_context(struct glx_screen *psc,
                        struct glx_config *mode,
-                       GLXContext shareList, int renderType)
+                       struct glx_context *shareList, int renderType)
 {
-   GLXContext gc;
+   struct glx_context *gc;
    int bufSize;
    CARD8 opcode;
    __GLXattribute *state;
@@ -308,12 +308,12 @@ indirect_create_context(struct glx_screen *psc,
    }
 
    /* Allocate our context record */
-   gc = (GLXContext) Xmalloc(sizeof(struct __GLXcontextRec));
+   gc = Xmalloc(sizeof *gc);
    if (!gc) {
       /* Out of memory */
       return NULL;
    }
-   memset(gc, 0, sizeof(struct __GLXcontextRec));
+   memset(gc, 0, sizeof *gc);
 
    glx_context_init(gc, psc, mode);
    gc->isDirect = GL_FALSE;
@@ -396,7 +396,7 @@ struct glx_screen_vtable indirect_screen_vtable = {
 };
 
 _X_HIDDEN struct glx_screen *
-indirect_create_screen(int screen, __GLXdisplayPrivate * priv)
+indirect_create_screen(int screen, struct glx_display * priv)
 {
    struct glx_screen *psc;
 
@@ -413,7 +413,7 @@ indirect_create_screen(int screen, __GLXdisplayPrivate * priv)
 
 
 _X_HIDDEN Bool
-glx_context_init(__GLXcontext *gc,
+glx_context_init(struct glx_context *gc,
                 struct glx_screen *psc, struct glx_config *config)
 {
    gc->majorOpcode = __glXSetupForCommand(psc->display->dpy);
@@ -441,13 +441,13 @@ glx_context_init(__GLXcontext *gc,
 static GLXContext
 CreateContext(Display * dpy, int generic_id,
               struct glx_config *config,
-              GLXContext shareList,
+              GLXContext shareList_user,
               Bool allowDirect,
              unsigned code, int renderType, int screen)
 {
-   GLXContext gc = NULL;
+   struct glx_context *gc = NULL;
    struct glx_screen *const psc = GetGLXScreenConfigs(dpy, screen);
-
+   struct glx_context *shareList = (struct glx_context *) shareList_user;
    if (dpy == NULL)
       return NULL;
 
@@ -529,7 +529,7 @@ CreateContext(Display * dpy, int generic_id,
    gc->imported = GL_FALSE;
    gc->renderType = renderType;
 
-   return gc;
+   return (GLXContext) gc;
 }
 
 _X_EXPORT GLXContext
@@ -579,7 +579,7 @@ glx_send_destroy_context(Display *dpy, XID xid)
 }
 
 static void
-indirect_destroy_context(__GLXcontext *gc)
+indirect_destroy_context(struct glx_context *gc)
 {
    if (!gc->imported && gc->xid)
       glx_send_destroy_context(gc->psc->dpy, gc->xid);
@@ -604,8 +604,10 @@ indirect_destroy_context(__GLXcontext *gc)
 ** Destroy the named context
 */
 static void
-DestroyContext(Display * dpy, GLXContext gc)
+DestroyContext(Display * dpy, GLXContext ctx)
 {
+   struct glx_context *gc = (struct glx_context *) ctx;
+
    if (!gc)
       return;
 
@@ -640,7 +642,7 @@ glXDestroyContext(Display * dpy, GLXContext gc)
 _X_EXPORT Bool
 glXQueryVersion(Display * dpy, int *major, int *minor)
 {
-   __GLXdisplayPrivate *priv;
+   struct glx_display *priv;
 
    /* Init the extension.  This fetches the major and minor version. */
    priv = __glXInitialize(dpy);
@@ -674,7 +676,7 @@ glXQueryExtension(Display * dpy, int *errorBase, int *eventBase)
 }
 
 static void
-indirect_wait_gl(__GLXcontext *gc)
+indirect_wait_gl(struct glx_context *gc)
 {
    xGLXWaitGLReq *req;
    Display *dpy = gc->currentDpy;
@@ -699,14 +701,14 @@ indirect_wait_gl(__GLXcontext *gc)
 _X_EXPORT void
 glXWaitGL(void)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
 
    if (gc && gc->vtable->use_x_font)
       gc->vtable->wait_gl(gc);
 }
 
 static void
-indirect_wait_x(__GLXcontext *gc)
+indirect_wait_x(struct glx_context *gc)
 {
    xGLXWaitXReq *req;
    Display *dpy = gc->currentDpy;
@@ -730,14 +732,14 @@ indirect_wait_x(__GLXcontext *gc)
 _X_EXPORT void
 glXWaitX(void)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
 
    if (gc && gc->vtable->use_x_font)
       gc->vtable->wait_x(gc);
 }
 
 static void
-indirect_use_x_font(__GLXcontext *gc,
+indirect_use_x_font(struct glx_context *gc,
                    Font font, int first, int count, int listBase)
 {
    xGLXUseXFontReq *req;
@@ -763,19 +765,19 @@ indirect_use_x_font(__GLXcontext *gc,
 #ifdef GLX_USE_APPLEGL
 
 static void
-applegl_destroy_context(__GLXcontext *gc)
+applegl_destroy_context(struct glx_context *gc)
 {
    apple_glx_destroy_context(&gc->driContext, gc->currentDpy);
 }
 
 static void
-applegl_wait_gl(__GLXcontext *gc)
+applegl_wait_gl(struct glx_context *gc)
 {
    glFinish();
 }
 
 static void
-applegl_wait_x(__GLXcontext *gc)
+applegl_wait_x(struct glx_context *gc)
 {
    apple_glx_waitx(gc->dpy, gc->driContext);
 }
@@ -794,7 +796,7 @@ static const struct glx_context_vtable applegl_context_vtable = {
 _X_EXPORT void
 glXUseXFont(Font font, int first, int count, int listBase)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
 
    if (gc && gc->vtable->use_x_font)
       gc->vtable->use_x_font(gc, font, first, count, listBase);
@@ -807,11 +809,13 @@ glXUseXFont(Font font, int first, int count, int listBase)
 ** attribute "mask".
 */
 _X_EXPORT void
-glXCopyContext(Display * dpy, GLXContext source,
-               GLXContext dest, unsigned long mask)
+glXCopyContext(Display * dpy, GLXContext source_user,
+              GLXContext dest_user, unsigned long mask)
 {
+   struct glx_context *source = (struct glx_context *) source_user;
+   struct glx_context *dest = (struct glx_context *) dest_user;
 #ifdef GLX_USE_APPLEGL
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    int errorcode;
    bool x11error;
 
@@ -822,7 +826,7 @@ glXCopyContext(Display * dpy, GLXContext source,
    
 #else
    xGLXCopyContextReq *req;
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    GLXContextTag tag;
    CARD8 opcode;
 
@@ -918,8 +922,10 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
  * the GLX protocol here at all?
  */
 _X_EXPORT Bool
-glXIsDirect(Display * dpy, GLXContext gc)
+glXIsDirect(Display * dpy, GLXContext gc_user)
 {
+   struct glx_context *gc = (struct glx_context *) gc_user;
+
    if (!gc) {
       return GL_FALSE;
    }
@@ -974,7 +980,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
       /* FIXME: Maybe delay __DRIdrawable creation until the drawable
        * is actually bound to a context... */
 
-      __GLXdisplayPrivate *const priv = __glXInitialize(dpy);
+      struct glx_display *const priv = __glXInitialize(dpy);
       __GLXDRIdrawable *pdraw;
       struct glx_screen *psc;
       struct glx_config *config;
@@ -1029,7 +1035,7 @@ glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap)
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
    {
-      __GLXdisplayPrivate *const priv = __glXInitialize(dpy);
+      struct glx_display *const priv = __glXInitialize(dpy);
       __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, glxpixmap);
 
       if (pdraw != NULL) {
@@ -1052,7 +1058,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
       __glXSendError(dpy, GLXBadCurrentWindow, 0, X_GLXSwapBuffers, false);
    }
 #else
-   GLXContext gc;
+   struct glx_context *gc;
    GLXContextTag tag;
    CARD8 opcode;
 #ifdef USE_XCB
@@ -1118,7 +1124,7 @@ _X_EXPORT int
 glXGetConfig(Display * dpy, XVisualInfo * vis, int attribute,
              int *value_return)
 {
-   __GLXdisplayPrivate *priv;
+   struct glx_display *priv;
    struct glx_screen *psc;
    struct glx_config *config;
    int status;
@@ -1479,7 +1485,7 @@ _X_EXPORT XVisualInfo *
 glXChooseVisual(Display * dpy, int screen, int *attribList)
 {
    XVisualInfo *visualList = NULL;
-   __GLXdisplayPrivate *priv;
+   struct glx_display *priv;
    struct glx_screen *psc;
    struct glx_config test_config;
    struct glx_config *config;
@@ -1545,7 +1551,7 @@ _X_EXPORT const char *
 glXQueryExtensionsString(Display * dpy, int screen)
 {
    struct glx_screen *psc;
-   __GLXdisplayPrivate *priv;
+   struct glx_display *priv;
 
    if (GetGLXPrivScreenConfig(dpy, screen, &priv, &psc) != Success) {
       return NULL;
@@ -1591,7 +1597,7 @@ _X_EXPORT const char *
 glXQueryServerString(Display * dpy, int screen, int name)
 {
    struct glx_screen *psc;
-   __GLXdisplayPrivate *priv;
+   struct glx_display *priv;
    const char **str;
 
 
@@ -1660,7 +1666,7 @@ __glXClientInfo(Display * dpy, int opcode)
 _X_EXPORT Display *
 glXGetCurrentDisplay(void)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    if (NULL == gc)
       return NULL;
    return gc->currentDpy;
@@ -1674,11 +1680,11 @@ GLX_ALIAS(Display *, glXGetCurrentDisplayEXT, (void), (),
 _X_EXPORT GLXContext
 glXImportContextEXT(Display *dpy, GLXContextID contextID)
 {
-   __GLXdisplayPrivate *priv = __glXInitialize(dpy);
+   struct glx_display *priv = __glXInitialize(dpy);
    struct glx_screen *psc;
    xGLXQueryContextReply reply;
    CARD8 opcode;
-   GLXContext ctx;
+   struct glx_context *ctx;
    int propList[__GLX_MAX_CONTEXT_PROPS * 2], *pProp, nPropListBytes;
    int i, renderType;
    XID share;
@@ -1767,14 +1773,16 @@ glXImportContextEXT(Display *dpy, GLXContextID contextID)
    ctx->imported = GL_TRUE;
    ctx->share_xid = share;
 
-   return ctx;
+   return (GLXContext) ctx;
 }
 
 #endif
 
 _X_EXPORT int
-glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value)
+glXQueryContext(Display * dpy, GLXContext ctx_user, int attribute, int *value)
 {
+   struct glx_context *ctx = (struct glx_context *) ctx_user;
+
    switch (attribute) {
       case GLX_SHARE_CONTEXT_EXT:
       *value = ctx->share_xid;
@@ -1802,8 +1810,10 @@ GLX_ALIAS(int, glXQueryContextInfoEXT,
           (Display * dpy, GLXContext ctx, int attribute, int *value),
           (dpy, ctx, attribute, value), glXQueryContext)
 
-_X_EXPORT GLXContextID glXGetContextIDEXT(const GLXContext ctx)
+_X_EXPORT GLXContextID glXGetContextIDEXT(const GLXContext ctx_user)
 {
+   struct glx_context *ctx = (struct glx_context *) ctx_user;
+
    return ctx->xid;
 }
 
@@ -1853,7 +1863,8 @@ glXCreateNewContext(Display * dpy, GLXFBConfig fbconfig,
 _X_EXPORT GLXDrawable
 glXGetCurrentReadDrawable(void)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
+
    return gc->currentReadable;
 }
 
@@ -1861,7 +1872,7 @@ glXGetCurrentReadDrawable(void)
 _X_EXPORT GLXFBConfig *
 glXGetFBConfigs(Display * dpy, int screen, int *nelements)
 {
-   __GLXdisplayPrivate *priv = __glXInitialize(dpy);
+   struct glx_display *priv = __glXInitialize(dpy);
    struct glx_config **config_list = NULL;
    struct glx_config *config;
    unsigned num_configs = 0;
@@ -1934,7 +1945,7 @@ static int
 __glXSwapIntervalSGI(int interval)
 {
    xGLXVendorPrivateReq *req;
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    struct glx_screen *psc;
    Display *dpy;
    CARD32 *interval_ptr;
@@ -1991,7 +2002,7 @@ static int
 __glXSwapIntervalMESA(unsigned int interval)
 {
 #ifdef GLX_DIRECT_RENDERING
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
 
    if (gc != NULL && gc->driContext) {
       struct glx_screen *psc;
@@ -2013,7 +2024,7 @@ static int
 __glXGetSwapIntervalMESA(void)
 {
 #ifdef GLX_DIRECT_RENDERING
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
 
    if (gc != NULL && gc->driContext) {
       struct glx_screen *psc;
@@ -2039,7 +2050,7 @@ __glXGetVideoSyncSGI(unsigned int *count)
 {
    int64_t ust, msc, sbc;
    int ret;
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    struct glx_screen *psc;
 #ifdef GLX_DIRECT_RENDERING
    __GLXDRIdrawable *pdraw;
@@ -2076,7 +2087,7 @@ __glXGetVideoSyncSGI(unsigned int *count)
 static int
 __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    struct glx_screen *psc;
 #ifdef GLX_DIRECT_RENDERING
    __GLXDRIdrawable *pdraw;
@@ -2217,7 +2228,7 @@ glXCreateContextWithConfigSGIX(Display * dpy,
 _X_EXPORT GLXFBConfigSGIX
 glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * vis)
 {
-   __GLXdisplayPrivate *priv;
+   struct glx_display *priv;
    struct glx_screen *psc = NULL;
 
    if ((GetGLXPrivScreenConfig(dpy, vis->screen, &priv, &psc) != Success)
@@ -2272,7 +2283,7 @@ static Bool
 __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
                       int64_t * ust, int64_t * msc, int64_t * sbc)
 {
-   __GLXdisplayPrivate * const priv = __glXInitialize(dpy);
+   struct glx_display * const priv = __glXInitialize(dpy);
    int ret;
 #ifdef GLX_DIRECT_RENDERING
    __GLXDRIdrawable *pdraw;
@@ -2402,7 +2413,7 @@ static int64_t
 __glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable,
                        int64_t target_msc, int64_t divisor, int64_t remainder)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
 #ifdef GLX_DIRECT_RENDERING
    __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
    struct glx_screen *psc = pdraw ? pdraw->psc : NULL;
@@ -2561,7 +2572,7 @@ __glXCopySubBufferMESA(Display * dpy, GLXDrawable drawable,
                        int x, int y, int width, int height)
 {
    xGLXVendorPrivateReq *req;
-   GLXContext gc;
+   struct glx_context *gc;
    GLXContextTag tag;
    CARD32 *drawable_ptr;
    INT32 *x_ptr, *y_ptr, *w_ptr, *h_ptr;
@@ -2631,7 +2642,7 @@ indirect_bind_tex_image(Display * dpy,
                        int buffer, const int *attrib_list)
 {
    xGLXVendorPrivateReq *req;
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    CARD32 *drawable_ptr;
    INT32 *buffer_ptr;
    CARD32 *num_attrib_ptr;
@@ -2682,7 +2693,7 @@ static void
 indirect_release_tex_image(Display * dpy, GLXDrawable drawable, int buffer)
 {
    xGLXVendorPrivateReq *req;
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    CARD32 *drawable_ptr;
    INT32 *buffer_ptr;
    CARD8 opcode;
@@ -2722,7 +2733,7 @@ static void
 __glXBindTexImageEXT(Display * dpy,
                      GLXDrawable drawable, int buffer, const int *attrib_list)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
 
    if (gc == NULL || gc->vtable->bind_tex_image == NULL)
       return;
@@ -2733,7 +2744,7 @@ __glXBindTexImageEXT(Display * dpy,
 static void
 __glXReleaseTexImageEXT(Display * dpy, GLXDrawable drawable, int buffer)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
 
    if (gc == NULL || gc->vtable->release_tex_image == NULL)
       return;
index f4d4f2e..c293af3 100644 (file)
@@ -61,7 +61,7 @@ static GLubyte dummyBuffer[__GLX_BUFFER_LIMIT_SIZE];
 ** gl and glx entry points are designed to operate as nop's when using
 ** the dummy context structure.
 */
-static __GLXcontext dummyContext = {
+static struct glx_context dummyContext = {
    &dummyBuffer[0],
    &dummyBuffer[0],
    &dummyBuffer[0],
@@ -74,7 +74,7 @@ static __GLXcontext dummyContext = {
 /*
 ** All indirect rendering contexts will share the same indirect dispatch table.
 */
-static __GLapi *IndirectAPI = NULL;
+static struct _glapi_table *IndirectAPI = NULL;
 #endif
 
 /*
@@ -98,7 +98,7 @@ __thread void *__glX_tls_Context __attribute__ ((tls_model("initial-exec")))
    = &dummyContext;
 
 _X_HIDDEN void
-__glXSetCurrentContext(__GLXcontext * c)
+__glXSetCurrentContext(struct glx_context * c)
 {
    __glX_tls_Context = (c != NULL) ? c : &dummyContext;
 }
@@ -133,13 +133,13 @@ init_thread_data(void)
 }
 
 _X_HIDDEN void
-__glXSetCurrentContext(__GLXcontext * c)
+__glXSetCurrentContext(struct glx_context * c)
 {
    pthread_once(&once_control, init_thread_data);
    pthread_setspecific(ContextTSD, c);
 }
 
-_X_HIDDEN __GLXcontext *
+_X_HIDDEN struct glx_context *
 __glXGetCurrentContext(void)
 {
    void *v;
@@ -147,7 +147,7 @@ __glXGetCurrentContext(void)
    pthread_once(&once_control, init_thread_data);
 
    v = pthread_getspecific(ContextTSD);
-   return (v == NULL) ? &dummyContext : (__GLXcontext *) v;
+   return (v == NULL) ? &dummyContext : (struct glx_context *) v;
 }
 
 # endif /* defined( GLX_USE_TLS ) */
@@ -159,7 +159,7 @@ __glXGetCurrentContext(void)
 #else
 
 /* not thread safe */
-_X_HIDDEN __GLXcontext *__glXcurrentContext = &dummyContext;
+_X_HIDDEN struct glx_context *__glXcurrentContext = &dummyContext;
 
 #endif
 
@@ -182,20 +182,20 @@ __glXSetCurrentContextNull(void)
 _X_EXPORT GLXContext
 glXGetCurrentContext(void)
 {
-   GLXContext cx = __glXGetCurrentContext();
+   struct glx_context *cx = __glXGetCurrentContext();
 
    if (cx == &dummyContext) {
       return NULL;
    }
    else {
-      return cx;
+      return (GLXContext) cx;
    }
 }
 
 _X_EXPORT GLXDrawable
 glXGetCurrentDrawable(void)
 {
-   GLXContext gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    return gc->currentDrawable;
 }
 
@@ -239,7 +239,7 @@ SendMakeCurrentRequest(Display * dpy, CARD8 opcode,
       req->oldContextTag = gc_tag;
    }
    else {
-      __GLXdisplayPrivate *priv = __glXInitialize(dpy);
+      struct glx_display *priv = __glXInitialize(dpy);
 
       /* If the server can support the GLX 1.3 version, we should
        * perfer that.  Not only that, some servers support GLX 1.3 but
@@ -286,9 +286,10 @@ SendMakeCurrentRequest(Display * dpy, CARD8 opcode,
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
 static __GLXDRIdrawable *
-FetchDRIDrawable(Display * dpy, GLXDrawable glxDrawable, GLXContext gc)
+FetchDRIDrawable(Display * dpy,
+                GLXDrawable glxDrawable, struct glx_context *gc)
 {
-   __GLXdisplayPrivate *const priv = __glXInitialize(dpy);
+   struct glx_display *const priv = __glXInitialize(dpy);
    __GLXDRIdrawable *pdraw;
    struct glx_screen *psc;
 
@@ -314,7 +315,7 @@ FetchDRIDrawable(Display * dpy, GLXDrawable glxDrawable, GLXContext gc)
 #endif /* GLX_DIRECT_RENDERING */
 
 static void
-__glXGenerateError(Display * dpy, GLXContext gc, XID resource,
+__glXGenerateError(Display * dpy, struct glx_context *gc, XID resource,
                    BYTE errorCode, CARD16 minorCode)
 {
    xError error;
@@ -337,9 +338,10 @@ __glXGenerateError(Display * dpy, GLXContext gc, XID resource,
  */
 static Bool
 MakeContextCurrent(Display * dpy, GLXDrawable draw,
-                   GLXDrawable read, GLXContext gc)
+                   GLXDrawable read, GLXContext gc_user)
 {
-   const GLXContext oldGC = __glXGetCurrentContext();
+   struct glx_context *gc = (struct glx_context *) gc_user;
+   struct glx_context *oldGC = __glXGetCurrentContext();
 #ifdef GLX_USE_APPLEGL
    bool error = apple_glx_make_current_context(dpy, 
                    (oldGC && oldGC != &dummyContext) ? oldGC->driContext : NULL, 
index 930709b..5930d7d 100644 (file)
@@ -56,7 +56,7 @@
 
 
 #ifdef DEBUG
-void __glXDumpDrawBuffer(__GLXcontext * ctx);
+void __glXDumpDrawBuffer(struct glx_context * ctx);
 #endif
 
 /*
@@ -68,7 +68,7 @@ _X_HIDDEN int __glXDebug = 0;
 /* Extension required boiler plate */
 
 static const char __glXExtensionName[] = GLX_EXTENSION_NAME;
-static __GLXdisplayPrivate *glx_displays;
+  static struct glx_display *glx_displays;
 
 static /* const */ char *error_list[] = {
    "GLXBadContext",
@@ -107,7 +107,7 @@ XEXT_GENERATE_ERROR_STRING(__glXErrorString, __glXExtensionName,
 static Bool
 __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
 {
-   __GLXdisplayPrivate *glx_dpy = __glXInitialize(dpy);
+     struct glx_display *glx_dpy = __glXInitialize(dpy);
 
    if (glx_dpy == NULL)
       return False;
@@ -167,7 +167,7 @@ __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
 static Status
 __glXEventToWire(Display *dpy, XEvent *event, xEvent *wire)
 {
-   __GLXdisplayPrivate *glx_dpy = __glXInitialize(dpy);
+     struct glx_display *glx_dpy = __glXInitialize(dpy);
 
    if (glx_dpy == NULL)
       return False;
@@ -197,7 +197,7 @@ __glXEventToWire(Display *dpy, XEvent *event, xEvent *wire)
 ** __glXScreenConfigs.
 */
 static void
-FreeScreenConfigs(__GLXdisplayPrivate * priv)
+  FreeScreenConfigs(struct glx_display * priv)
 {
    struct glx_screen *psc;
    GLint i, screens;
@@ -239,8 +239,8 @@ FreeScreenConfigs(__GLXdisplayPrivate * priv)
 static int
 __glXCloseDisplay(Display * dpy, XExtCodes * codes)
 {
-   __GLXdisplayPrivate *priv, **prev;
-   GLXContext gc;
+     struct glx_display *priv, **prev;
+     struct glx_context *gc;
 
    _XLockMutex(_Xglobal_lock);
    prev = &glx_displays;
@@ -647,7 +647,7 @@ createConfigsFromProperties(Display * dpy, int nvisuals, int nprops,
 
 static GLboolean
 getVisualConfigs(struct glx_screen *psc,
-                __GLXdisplayPrivate *priv, int screen)
+                 struct glx_display *priv, int screen)
 {
    xGLXGetVisualConfigsReq *req;
    xGLXGetVisualConfigsReply reply;
@@ -675,7 +675,7 @@ getVisualConfigs(struct glx_screen *psc,
 }
 
 static GLboolean
-getFBConfigs(struct glx_screen *psc, __GLXdisplayPrivate *priv, int screen)
+ getFBConfigs(struct glx_screen *psc, struct glx_display *priv, int screen)
 {
    xGLXGetFBConfigsReq *fb_req;
    xGLXGetFBConfigsSGIXReq *sgi_req;
@@ -723,7 +723,7 @@ getFBConfigs(struct glx_screen *psc, __GLXdisplayPrivate *priv, int screen)
 
 _X_HIDDEN Bool
 glx_screen_init(struct glx_screen *psc,
-               int screen, __GLXdisplayPrivate * priv)
+                int screen, struct glx_display * priv)
 {
    /* Initialize per screen dynamic client GLX extensions */
    psc->ext_list_first_time = GL_TRUE;
@@ -742,7 +742,7 @@ glx_screen_init(struct glx_screen *psc,
 ** If that works then fetch the per screen configs data.
 */
 static Bool
-AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv)
+ AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv)
 {
    struct glx_screen *psc;
    GLint i, screens;
@@ -783,10 +783,10 @@ AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv)
 /*
 ** Initialize the client side extension code.
 */
-_X_HIDDEN __GLXdisplayPrivate *
+ _X_HIDDEN struct glx_display *
 __glXInitialize(Display * dpy)
 {
-   __GLXdisplayPrivate *dpyPriv;
+    struct glx_display *dpyPriv;
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
    Bool glx_direct, glx_accel;
 #endif
@@ -881,8 +881,8 @@ __glXInitialize(Display * dpy)
 _X_HIDDEN CARD8
 __glXSetupForCommand(Display * dpy)
 {
-   GLXContext gc;
-   __GLXdisplayPrivate *priv;
+    struct glx_context *gc;
+    struct glx_display *priv;
 
    /* If this thread has a current context, flush its rendering commands */
    gc = __glXGetCurrentContext();
@@ -921,7 +921,7 @@ __glXSetupForCommand(Display * dpy)
  * \c pc parameter.
  */
 _X_HIDDEN GLubyte *
-__glXFlushRenderBuffer(__GLXcontext * ctx, GLubyte * pc)
+__glXFlushRenderBuffer(struct glx_context * ctx, GLubyte * pc)
 {
    Display *const dpy = ctx->currentDpy;
 #ifdef USE_XCB
@@ -972,7 +972,7 @@ __glXFlushRenderBuffer(__GLXcontext * ctx, GLubyte * pc)
  * \param dataLen        Size, in bytes, of the command data.
  */
 _X_HIDDEN void
-__glXSendLargeChunk(__GLXcontext * gc, GLint requestNumber,
+__glXSendLargeChunk(struct glx_context * gc, GLint requestNumber,
                     GLint totalRequests, const GLvoid * data, GLint dataLen)
 {
    Display *dpy = gc->currentDpy;
@@ -1021,7 +1021,7 @@ __glXSendLargeChunk(__GLXcontext * gc, GLint requestNumber,
  * \param dataLen    Size, in bytes, of the command data.
  */
 _X_HIDDEN void
-__glXSendLargeCommand(__GLXcontext * ctx,
+__glXSendLargeCommand(struct glx_context * ctx,
                       const GLvoid * header, GLint headerLen,
                       const GLvoid * data, GLint dataLen)
 {
@@ -1063,7 +1063,7 @@ __glXSendLargeCommand(__GLXcontext * ctx,
 
 #ifdef DEBUG
 _X_HIDDEN void
-__glXDumpDrawBuffer(__GLXcontext * ctx)
+__glXDumpDrawBuffer(struct glx_context * ctx)
 {
    GLubyte *p = ctx->buf;
    GLubyte *end = ctx->pc;
index c5ca773..23161ef 100644 (file)
@@ -513,7 +513,7 @@ __glXExtensionBitIsEnabled(struct glx_screen * psc, unsigned bit)
  *
  */
 GLboolean
-__glExtensionBitIsEnabled(const __GLXcontext * gc, unsigned bit)
+__glExtensionBitIsEnabled(struct glx_context *gc, unsigned bit)
 {
    GLboolean enabled = GL_FALSE;
 
@@ -675,7 +675,7 @@ __glXCalculateUsableExtensions(struct glx_screen * psc,
  */
 
 void
-__glXCalculateUsableGLExtensions(__GLXcontext * gc,
+__glXCalculateUsableGLExtensions(struct glx_context * gc,
                                  const char *server_string,
                                  int major_version, int minor_version)
 {
index e5f0b44..a11fe88 100644 (file)
@@ -235,7 +235,7 @@ enum
 #define __GL_EXT_BYTES   ((__NUM_GL_EXTS + 7) / 8)
 
 struct glx_screen;
-struct __GLXcontextRec;
+struct glx_context;
 
 extern GLboolean __glXExtensionBitIsEnabled(struct glx_screen *psc,
                                             unsigned bit);
@@ -245,14 +245,14 @@ extern void __glXCalculateUsableExtensions(struct glx_screen *psc,
                                            display_is_direct_capable,
                                            int server_minor_version);
 
-extern void __glXCalculateUsableGLExtensions(struct __GLXcontextRec *gc,
+extern void __glXCalculateUsableGLExtensions(struct glx_context *gc,
                                              const char *server_string,
                                              int major_version,
                                              int minor_version);
 extern void __glXGetGLVersion(int *major_version, int *minor_version);
 extern char *__glXGetClientGLExtensionString(void);
 
-extern GLboolean __glExtensionBitIsEnabled(const struct __GLXcontextRec *gc,
+extern GLboolean __glExtensionBitIsEnabled(struct glx_context *gc,
                                            unsigned bit);
 
 extern void
index 1727278..0dea8e9 100644 (file)
@@ -91,7 +91,7 @@ __glXReadReply(Display * dpy, size_t size, void *dest,
 }
 
 NOINLINE void
-__glXReadPixelReply(Display * dpy, __GLXcontext * gc, unsigned max_dim,
+__glXReadPixelReply(Display * dpy, struct glx_context * gc, unsigned max_dim,
                     GLint width, GLint height, GLint depth, GLenum format,
                     GLenum type, void *dest, GLboolean dimensions_in_reply)
 {
@@ -138,7 +138,7 @@ __glXReadPixelReply(Display * dpy, __GLXcontext * gc, unsigned max_dim,
 #define X_GLXSingle 0
 
 NOINLINE FASTCALL GLubyte *
-__glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen)
+__glXSetupSingleRequest(struct glx_context * gc, GLint sop, GLint cmdlen)
 {
     xGLXSingleReq *req;
     Display *const dpy = gc->currentDpy;
@@ -153,7 +153,7 @@ __glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen)
 }
 
 NOINLINE FASTCALL GLubyte *
-__glXSetupVendorRequest(__GLXcontext * gc, GLint code, GLint vop,
+__glXSetupVendorRequest(struct glx_context * gc, GLint code, GLint vop,
                         GLint cmdlen)
 {
     xGLXVendorPrivateReq *req;
@@ -185,7 +185,7 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
 static FASTCALL NOINLINE void
 generic_3_byte(GLint rop, const void *ptr)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
 
     emit_header(gc->pc, rop, cmdlen);
@@ -199,7 +199,7 @@ generic_3_byte(GLint rop, const void *ptr)
 static FASTCALL NOINLINE void
 generic_4_byte(GLint rop, const void *ptr)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
 
     emit_header(gc->pc, rop, cmdlen);
@@ -213,7 +213,7 @@ generic_4_byte(GLint rop, const void *ptr)
 static FASTCALL NOINLINE void
 generic_6_byte(GLint rop, const void *ptr)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
 
     emit_header(gc->pc, rop, cmdlen);
@@ -227,7 +227,7 @@ generic_6_byte(GLint rop, const void *ptr)
 static FASTCALL NOINLINE void
 generic_8_byte(GLint rop, const void *ptr)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
 
     emit_header(gc->pc, rop, cmdlen);
@@ -241,7 +241,7 @@ generic_8_byte(GLint rop, const void *ptr)
 static FASTCALL NOINLINE void
 generic_12_byte(GLint rop, const void *ptr)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
 
     emit_header(gc->pc, rop, cmdlen);
@@ -255,7 +255,7 @@ generic_12_byte(GLint rop, const void *ptr)
 static FASTCALL NOINLINE void
 generic_16_byte(GLint rop, const void *ptr)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
 
     emit_header(gc->pc, rop, cmdlen);
@@ -269,7 +269,7 @@ generic_16_byte(GLint rop, const void *ptr)
 static FASTCALL NOINLINE void
 generic_24_byte(GLint rop, const void *ptr)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
 
     emit_header(gc->pc, rop, cmdlen);
@@ -283,7 +283,7 @@ generic_24_byte(GLint rop, const void *ptr)
 static FASTCALL NOINLINE void
 generic_32_byte(GLint rop, const void *ptr)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 36;
 
     emit_header(gc->pc, rop, cmdlen);
@@ -298,7 +298,7 @@ generic_32_byte(GLint rop, const void *ptr)
 void
 __indirect_glNewList(GLuint list, GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -324,7 +324,7 @@ __indirect_glNewList(GLuint list, GLenum mode)
 void
 __indirect_glEndList(void)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 0;
@@ -347,7 +347,7 @@ __indirect_glEndList(void)
 void
 __indirect_glCallList(GLuint list)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_CallList, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&list), 4);
@@ -361,7 +361,7 @@ __indirect_glCallList(GLuint list)
 void
 __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glCallLists_size(type);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
     if (n < 0) {
@@ -399,7 +399,7 @@ __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
 void
 __indirect_glDeleteLists(GLuint list, GLsizei range)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -425,7 +425,7 @@ __indirect_glDeleteLists(GLuint list, GLsizei range)
 GLuint
 __indirect_glGenLists(GLsizei range)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     GLuint retval = (GLuint) 0;
 #ifndef USE_XCB
@@ -458,7 +458,7 @@ __indirect_glGenLists(GLsizei range)
 void
 __indirect_glListBase(GLuint base)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_ListBase, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&base), 4);
@@ -472,7 +472,7 @@ __indirect_glListBase(GLuint base)
 void
 __indirect_glBegin(GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Begin, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
@@ -488,7 +488,7 @@ __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig,
                     GLfloat yorig, GLfloat xmove, GLfloat ymove,
                     const GLubyte *bitmap)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize =
         (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX,
                                          GL_BITMAP, 0) : 0;
@@ -539,7 +539,7 @@ __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig,
 void
 __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Color3bv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
@@ -562,7 +562,7 @@ __indirect_glColor3bv(const GLbyte *v)
 void
 __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_Color3dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
@@ -585,7 +585,7 @@ __indirect_glColor3dv(const GLdouble * v)
 void
 __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Color3fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -608,7 +608,7 @@ __indirect_glColor3fv(const GLfloat * v)
 void
 __indirect_glColor3i(GLint red, GLint green, GLint blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Color3iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -631,7 +631,7 @@ __indirect_glColor3iv(const GLint * v)
 void
 __indirect_glColor3s(GLshort red, GLshort green, GLshort blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Color3sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
@@ -654,7 +654,7 @@ __indirect_glColor3sv(const GLshort * v)
 void
 __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
@@ -677,7 +677,7 @@ __indirect_glColor3ubv(const GLubyte *v)
 void
 __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -700,7 +700,7 @@ __indirect_glColor3uiv(const GLuint * v)
 void
 __indirect_glColor3us(GLushort red, GLushort green, GLushort blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Color3usv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
@@ -723,7 +723,7 @@ __indirect_glColor3usv(const GLushort * v)
 void
 __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Color4bv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
@@ -748,7 +748,7 @@ void
 __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue,
                      GLdouble alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 36;
     emit_header(gc->pc, X_GLrop_Color4dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
@@ -772,7 +772,7 @@ __indirect_glColor4dv(const GLdouble * v)
 void
 __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Color4fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -796,7 +796,7 @@ __indirect_glColor4fv(const GLfloat * v)
 void
 __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Color4iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -820,7 +820,7 @@ __indirect_glColor4iv(const GLint * v)
 void
 __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Color4sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
@@ -844,7 +844,7 @@ __indirect_glColor4sv(const GLshort * v)
 void
 __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
@@ -868,7 +868,7 @@ __indirect_glColor4ubv(const GLubyte *v)
 void
 __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -893,7 +893,7 @@ void
 __indirect_glColor4us(GLushort red, GLushort green, GLushort blue,
                       GLushort alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Color4usv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
@@ -917,7 +917,7 @@ __indirect_glColor4usv(const GLushort * v)
 void
 __indirect_glEdgeFlag(GLboolean flag)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
@@ -931,7 +931,7 @@ __indirect_glEdgeFlag(GLboolean flag)
 void
 __indirect_glEdgeFlagv(const GLboolean * flag)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (flag), 1);
@@ -945,7 +945,7 @@ __indirect_glEdgeFlagv(const GLboolean * flag)
 void
 __indirect_glEnd(void)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 4;
     emit_header(gc->pc, X_GLrop_End, cmdlen);
     gc->pc += cmdlen;
@@ -958,7 +958,7 @@ __indirect_glEnd(void)
 void
 __indirect_glIndexd(GLdouble c)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Indexdv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 8);
@@ -979,7 +979,7 @@ __indirect_glIndexdv(const GLdouble * c)
 void
 __indirect_glIndexf(GLfloat c)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Indexfv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
@@ -1000,7 +1000,7 @@ __indirect_glIndexfv(const GLfloat * c)
 void
 __indirect_glIndexi(GLint c)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Indexiv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
@@ -1021,7 +1021,7 @@ __indirect_glIndexiv(const GLint * c)
 void
 __indirect_glIndexs(GLshort c)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 2);
@@ -1035,7 +1035,7 @@ __indirect_glIndexs(GLshort c)
 void
 __indirect_glIndexsv(const GLshort * c)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Indexsv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (c), 2);
@@ -1049,7 +1049,7 @@ __indirect_glIndexsv(const GLshort * c)
 void
 __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 1);
@@ -1072,7 +1072,7 @@ __indirect_glNormal3bv(const GLbyte *v)
 void
 __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 8);
@@ -1095,7 +1095,7 @@ __indirect_glNormal3dv(const GLdouble * v)
 void
 __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
@@ -1118,7 +1118,7 @@ __indirect_glNormal3fv(const GLfloat * v)
 void
 __indirect_glNormal3i(GLint nx, GLint ny, GLint nz)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 4);
@@ -1141,7 +1141,7 @@ __indirect_glNormal3iv(const GLint * v)
 void
 __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&nx), 2);
@@ -1164,7 +1164,7 @@ __indirect_glNormal3sv(const GLshort * v)
 void
 __indirect_glRasterPos2d(GLdouble x, GLdouble y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
@@ -1186,7 +1186,7 @@ __indirect_glRasterPos2dv(const GLdouble * v)
 void
 __indirect_glRasterPos2f(GLfloat x, GLfloat y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -1208,7 +1208,7 @@ __indirect_glRasterPos2fv(const GLfloat * v)
 void
 __indirect_glRasterPos2i(GLint x, GLint y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -1230,7 +1230,7 @@ __indirect_glRasterPos2iv(const GLint * v)
 void
 __indirect_glRasterPos2s(GLshort x, GLshort y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
@@ -1252,7 +1252,7 @@ __indirect_glRasterPos2sv(const GLshort * v)
 void
 __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
@@ -1275,7 +1275,7 @@ __indirect_glRasterPos3dv(const GLdouble * v)
 void
 __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -1298,7 +1298,7 @@ __indirect_glRasterPos3fv(const GLfloat * v)
 void
 __indirect_glRasterPos3i(GLint x, GLint y, GLint z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -1321,7 +1321,7 @@ __indirect_glRasterPos3iv(const GLint * v)
 void
 __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
@@ -1344,7 +1344,7 @@ __indirect_glRasterPos3sv(const GLshort * v)
 void
 __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 36;
     emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
@@ -1368,7 +1368,7 @@ __indirect_glRasterPos4dv(const GLdouble * v)
 void
 __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -1392,7 +1392,7 @@ __indirect_glRasterPos4fv(const GLfloat * v)
 void
 __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -1416,7 +1416,7 @@ __indirect_glRasterPos4iv(const GLint * v)
 void
 __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
@@ -1440,7 +1440,7 @@ __indirect_glRasterPos4sv(const GLshort * v)
 void
 __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 36;
     emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 8);
@@ -1457,7 +1457,7 @@ __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
 void
 __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 36;
     emit_header(gc->pc, X_GLrop_Rectdv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 16);
@@ -1472,7 +1472,7 @@ __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2)
 void
 __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
@@ -1489,7 +1489,7 @@ __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
 void
 __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Rectfv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
@@ -1504,7 +1504,7 @@ __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2)
 void
 __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 4);
@@ -1521,7 +1521,7 @@ __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
 void
 __indirect_glRectiv(const GLint * v1, const GLint * v2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Rectiv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 8);
@@ -1536,7 +1536,7 @@ __indirect_glRectiv(const GLint * v1, const GLint * v2)
 void
 __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x1), 2);
@@ -1553,7 +1553,7 @@ __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
 void
 __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Rectsv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (v1), 4);
@@ -1568,7 +1568,7 @@ __indirect_glRectsv(const GLshort * v1, const GLshort * v2)
 void
 __indirect_glTexCoord1d(GLdouble s)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
@@ -1589,7 +1589,7 @@ __indirect_glTexCoord1dv(const GLdouble * v)
 void
 __indirect_glTexCoord1f(GLfloat s)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
@@ -1610,7 +1610,7 @@ __indirect_glTexCoord1fv(const GLfloat * v)
 void
 __indirect_glTexCoord1i(GLint s)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
@@ -1631,7 +1631,7 @@ __indirect_glTexCoord1iv(const GLint * v)
 void
 __indirect_glTexCoord1s(GLshort s)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
@@ -1645,7 +1645,7 @@ __indirect_glTexCoord1s(GLshort s)
 void
 __indirect_glTexCoord1sv(const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (v), 2);
@@ -1659,7 +1659,7 @@ __indirect_glTexCoord1sv(const GLshort * v)
 void
 __indirect_glTexCoord2d(GLdouble s, GLdouble t)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
@@ -1681,7 +1681,7 @@ __indirect_glTexCoord2dv(const GLdouble * v)
 void
 __indirect_glTexCoord2f(GLfloat s, GLfloat t)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
@@ -1703,7 +1703,7 @@ __indirect_glTexCoord2fv(const GLfloat * v)
 void
 __indirect_glTexCoord2i(GLint s, GLint t)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
@@ -1725,7 +1725,7 @@ __indirect_glTexCoord2iv(const GLint * v)
 void
 __indirect_glTexCoord2s(GLshort s, GLshort t)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
@@ -1747,7 +1747,7 @@ __indirect_glTexCoord2sv(const GLshort * v)
 void
 __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
@@ -1770,7 +1770,7 @@ __indirect_glTexCoord3dv(const GLdouble * v)
 void
 __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
@@ -1793,7 +1793,7 @@ __indirect_glTexCoord3fv(const GLfloat * v)
 void
 __indirect_glTexCoord3i(GLint s, GLint t, GLint r)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
@@ -1816,7 +1816,7 @@ __indirect_glTexCoord3iv(const GLint * v)
 void
 __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
@@ -1839,7 +1839,7 @@ __indirect_glTexCoord3sv(const GLshort * v)
 void
 __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 36;
     emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
@@ -1863,7 +1863,7 @@ __indirect_glTexCoord4dv(const GLdouble * v)
 void
 __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
@@ -1887,7 +1887,7 @@ __indirect_glTexCoord4fv(const GLfloat * v)
 void
 __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
@@ -1911,7 +1911,7 @@ __indirect_glTexCoord4iv(const GLint * v)
 void
 __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 2);
@@ -1935,7 +1935,7 @@ __indirect_glTexCoord4sv(const GLshort * v)
 void
 __indirect_glVertex2d(GLdouble x, GLdouble y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
@@ -1957,7 +1957,7 @@ __indirect_glVertex2dv(const GLdouble * v)
 void
 __indirect_glVertex2f(GLfloat x, GLfloat y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -1979,7 +1979,7 @@ __indirect_glVertex2fv(const GLfloat * v)
 void
 __indirect_glVertex2i(GLint x, GLint y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -2001,7 +2001,7 @@ __indirect_glVertex2iv(const GLint * v)
 void
 __indirect_glVertex2s(GLshort x, GLshort y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
@@ -2023,7 +2023,7 @@ __indirect_glVertex2sv(const GLshort * v)
 void
 __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
@@ -2046,7 +2046,7 @@ __indirect_glVertex3dv(const GLdouble * v)
 void
 __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -2069,7 +2069,7 @@ __indirect_glVertex3fv(const GLfloat * v)
 void
 __indirect_glVertex3i(GLint x, GLint y, GLint z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -2092,7 +2092,7 @@ __indirect_glVertex3iv(const GLint * v)
 void
 __indirect_glVertex3s(GLshort x, GLshort y, GLshort z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
@@ -2115,7 +2115,7 @@ __indirect_glVertex3sv(const GLshort * v)
 void
 __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 36;
     emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
@@ -2139,7 +2139,7 @@ __indirect_glVertex4dv(const GLdouble * v)
 void
 __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -2163,7 +2163,7 @@ __indirect_glVertex4fv(const GLfloat * v)
 void
 __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -2187,7 +2187,7 @@ __indirect_glVertex4iv(const GLint * v)
 void
 __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 2);
@@ -2211,7 +2211,7 @@ __indirect_glVertex4sv(const GLshort * v)
 void
 __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 40;
     emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (equation), 32);
@@ -2226,7 +2226,7 @@ __indirect_glClipPlane(GLenum plane, const GLdouble * equation)
 void
 __indirect_glColorMaterial(GLenum face, GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
@@ -2241,7 +2241,7 @@ __indirect_glColorMaterial(GLenum face, GLenum mode)
 void
 __indirect_glCullFace(GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_CullFace, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
@@ -2255,7 +2255,7 @@ __indirect_glCullFace(GLenum mode)
 void
 __indirect_glFogf(GLenum pname, GLfloat param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Fogf, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
@@ -2270,7 +2270,7 @@ __indirect_glFogf(GLenum pname, GLfloat param)
 void
 __indirect_glFogfv(GLenum pname, const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glFogfv_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_Fogfv, cmdlen);
@@ -2286,7 +2286,7 @@ __indirect_glFogfv(GLenum pname, const GLfloat * params)
 void
 __indirect_glFogi(GLenum pname, GLint param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Fogi, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
@@ -2301,7 +2301,7 @@ __indirect_glFogi(GLenum pname, GLint param)
 void
 __indirect_glFogiv(GLenum pname, const GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glFogiv_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_Fogiv, cmdlen);
@@ -2317,7 +2317,7 @@ __indirect_glFogiv(GLenum pname, const GLint * params)
 void
 __indirect_glFrontFace(GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_FrontFace, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
@@ -2331,7 +2331,7 @@ __indirect_glFrontFace(GLenum mode)
 void
 __indirect_glHint(GLenum target, GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Hint, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -2346,7 +2346,7 @@ __indirect_glHint(GLenum target, GLenum mode)
 void
 __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Lightf, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
@@ -2362,7 +2362,7 @@ __indirect_glLightf(GLenum light, GLenum pname, GLfloat param)
 void
 __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glLightfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_Lightfv, cmdlen);
@@ -2379,7 +2379,7 @@ __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params)
 void
 __indirect_glLighti(GLenum light, GLenum pname, GLint param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Lighti, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&light), 4);
@@ -2395,7 +2395,7 @@ __indirect_glLighti(GLenum light, GLenum pname, GLint param)
 void
 __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glLightiv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_Lightiv, cmdlen);
@@ -2412,7 +2412,7 @@ __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params)
 void
 __indirect_glLightModelf(GLenum pname, GLfloat param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_LightModelf, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
@@ -2427,7 +2427,7 @@ __indirect_glLightModelf(GLenum pname, GLfloat param)
 void
 __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glLightModelfv_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen);
@@ -2443,7 +2443,7 @@ __indirect_glLightModelfv(GLenum pname, const GLfloat * params)
 void
 __indirect_glLightModeli(GLenum pname, GLint param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_LightModeli, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
@@ -2458,7 +2458,7 @@ __indirect_glLightModeli(GLenum pname, GLint param)
 void
 __indirect_glLightModeliv(GLenum pname, const GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glLightModeliv_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen);
@@ -2474,7 +2474,7 @@ __indirect_glLightModeliv(GLenum pname, const GLint * params)
 void
 __indirect_glLineStipple(GLint factor, GLushort pattern)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_LineStipple, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
@@ -2489,7 +2489,7 @@ __indirect_glLineStipple(GLint factor, GLushort pattern)
 void
 __indirect_glLineWidth(GLfloat width)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_LineWidth, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&width), 4);
@@ -2503,7 +2503,7 @@ __indirect_glLineWidth(GLfloat width)
 void
 __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Materialf, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
@@ -2519,7 +2519,7 @@ __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param)
 void
 __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glMaterialfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_Materialfv, cmdlen);
@@ -2536,7 +2536,7 @@ __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params)
 void
 __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Materiali, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
@@ -2552,7 +2552,7 @@ __indirect_glMateriali(GLenum face, GLenum pname, GLint param)
 void
 __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glMaterialiv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_Materialiv, cmdlen);
@@ -2569,7 +2569,7 @@ __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params)
 void
 __indirect_glPointSize(GLfloat size)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_PointSize, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&size), 4);
@@ -2583,7 +2583,7 @@ __indirect_glPointSize(GLfloat size)
 void
 __indirect_glPolygonMode(GLenum face, GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
@@ -2598,7 +2598,7 @@ __indirect_glPolygonMode(GLenum face, GLenum mode)
 void
 __indirect_glPolygonStipple(const GLubyte *mask)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize =
         (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
                                        0) : 0;
@@ -2621,7 +2621,7 @@ __indirect_glPolygonStipple(const GLubyte *mask)
 void
 __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Scissor, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -2638,7 +2638,7 @@ __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
 void
 __indirect_glShadeModel(GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
@@ -2652,7 +2652,7 @@ __indirect_glShadeModel(GLenum mode)
 void
 __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -2669,7 +2669,7 @@ void
 __indirect_glTexParameterfv(GLenum target, GLenum pname,
                             const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glTexParameterfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen);
@@ -2686,7 +2686,7 @@ __indirect_glTexParameterfv(GLenum target, GLenum pname,
 void
 __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -2702,7 +2702,7 @@ __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param)
 void
 __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glTexParameteriv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen);
@@ -2721,7 +2721,7 @@ __glx_TexImage_1D2D(unsigned opcode, unsigned dim, GLenum target, GLint level,
                     GLint border, GLenum format, GLenum type,
                     const GLvoid * pixels)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize =
         __glImageSize(width, height, 1, format, type, target);
     const GLuint cmdlen = 56 + __GLX_PAD(compsize);
@@ -2795,7 +2795,7 @@ __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat,
 void
 __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -2811,7 +2811,7 @@ __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
 void
 __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glTexEnvfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen);
@@ -2828,7 +2828,7 @@ __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
 void
 __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -2844,7 +2844,7 @@ __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param)
 void
 __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glTexEnviv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen);
@@ -2861,7 +2861,7 @@ __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params)
 void
 __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_TexGend, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&param), 8);
@@ -2877,7 +2877,7 @@ __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param)
 void
 __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glTexGendv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8));
     emit_header(gc->pc, X_GLrop_TexGendv, cmdlen);
@@ -2894,7 +2894,7 @@ __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params)
 void
 __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_TexGenf, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
@@ -2910,7 +2910,7 @@ __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
 void
 __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glTexGenfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen);
@@ -2927,7 +2927,7 @@ __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
 void
 __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_TexGeni, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
@@ -2943,7 +2943,7 @@ __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param)
 void
 __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glTexGeniv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen);
@@ -2960,7 +2960,7 @@ __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params)
 void
 __indirect_glInitNames(void)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 4;
     emit_header(gc->pc, X_GLrop_InitNames, cmdlen);
     gc->pc += cmdlen;
@@ -2973,7 +2973,7 @@ __indirect_glInitNames(void)
 void
 __indirect_glLoadName(GLuint name)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_LoadName, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
@@ -2987,7 +2987,7 @@ __indirect_glLoadName(GLuint name)
 void
 __indirect_glPassThrough(GLfloat token)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_PassThrough, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&token), 4);
@@ -3001,7 +3001,7 @@ __indirect_glPassThrough(GLfloat token)
 void
 __indirect_glPopName(void)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 4;
     emit_header(gc->pc, X_GLrop_PopName, cmdlen);
     gc->pc += cmdlen;
@@ -3014,7 +3014,7 @@ __indirect_glPopName(void)
 void
 __indirect_glPushName(GLuint name)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_PushName, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&name), 4);
@@ -3028,7 +3028,7 @@ __indirect_glPushName(GLuint name)
 void
 __indirect_glDrawBuffer(GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
@@ -3042,7 +3042,7 @@ __indirect_glDrawBuffer(GLenum mode)
 void
 __indirect_glClear(GLbitfield mask)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Clear, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
@@ -3057,7 +3057,7 @@ void
 __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue,
                         GLfloat alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -3074,7 +3074,7 @@ __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue,
 void
 __indirect_glClearIndex(GLfloat c)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 4);
@@ -3089,7 +3089,7 @@ void
 __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue,
                         GLclampf alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_ClearColor, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -3106,7 +3106,7 @@ __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue,
 void
 __indirect_glClearStencil(GLint s)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 4);
@@ -3120,7 +3120,7 @@ __indirect_glClearStencil(GLint s)
 void
 __indirect_glClearDepth(GLclampd depth)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&depth), 8);
@@ -3134,7 +3134,7 @@ __indirect_glClearDepth(GLclampd depth)
 void
 __indirect_glStencilMask(GLuint mask)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_StencilMask, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
@@ -3149,7 +3149,7 @@ void
 __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue,
                        GLboolean alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_ColorMask, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
@@ -3166,7 +3166,7 @@ __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue,
 void
 __indirect_glDepthMask(GLboolean flag)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_DepthMask, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&flag), 1);
@@ -3180,7 +3180,7 @@ __indirect_glDepthMask(GLboolean flag)
 void
 __indirect_glIndexMask(GLuint mask)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_IndexMask, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
@@ -3194,7 +3194,7 @@ __indirect_glIndexMask(GLuint mask)
 void
 __indirect_glAccum(GLenum op, GLfloat value)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_Accum, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&op), 4);
@@ -3209,7 +3209,7 @@ __indirect_glAccum(GLenum op, GLfloat value)
 void
 __indirect_glPopAttrib(void)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 4;
     emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen);
     gc->pc += cmdlen;
@@ -3222,7 +3222,7 @@ __indirect_glPopAttrib(void)
 void
 __indirect_glPushAttrib(GLbitfield mask)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mask), 4);
@@ -3236,7 +3236,7 @@ __indirect_glPushAttrib(GLbitfield mask)
 void
 __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
@@ -3252,7 +3252,7 @@ __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
 void
 __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
@@ -3269,7 +3269,7 @@ void
 __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn,
                        GLdouble v1, GLdouble v2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 44;
     emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&u1), 8);
@@ -3289,7 +3289,7 @@ void
 __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1,
                        GLfloat v2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&un), 4);
@@ -3308,7 +3308,7 @@ __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1,
 void
 __indirect_glEvalCoord1d(GLdouble u)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
@@ -3329,7 +3329,7 @@ __indirect_glEvalCoord1dv(const GLdouble * u)
 void
 __indirect_glEvalCoord1f(GLfloat u)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
@@ -3350,7 +3350,7 @@ __indirect_glEvalCoord1fv(const GLfloat * u)
 void
 __indirect_glEvalCoord2d(GLdouble u, GLdouble v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 8);
@@ -3372,7 +3372,7 @@ __indirect_glEvalCoord2dv(const GLdouble * u)
 void
 __indirect_glEvalCoord2f(GLfloat u, GLfloat v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&u), 4);
@@ -3394,7 +3394,7 @@ __indirect_glEvalCoord2fv(const GLfloat * u)
 void
 __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
@@ -3410,7 +3410,7 @@ __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
 void
 __indirect_glEvalPoint1(GLint i)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
@@ -3424,7 +3424,7 @@ __indirect_glEvalPoint1(GLint i)
 void
 __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
@@ -3442,7 +3442,7 @@ __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
 void
 __indirect_glEvalPoint2(GLint i, GLint j)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&i), 4);
@@ -3457,7 +3457,7 @@ __indirect_glEvalPoint2(GLint i, GLint j)
 void
 __indirect_glAlphaFunc(GLenum func, GLclampf ref)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
@@ -3472,7 +3472,7 @@ __indirect_glAlphaFunc(GLenum func, GLclampf ref)
 void
 __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactor), 4);
@@ -3487,7 +3487,7 @@ __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor)
 void
 __indirect_glLogicOp(GLenum opcode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_LogicOp, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&opcode), 4);
@@ -3501,7 +3501,7 @@ __indirect_glLogicOp(GLenum opcode)
 void
 __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
@@ -3517,7 +3517,7 @@ __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask)
 void
 __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_StencilOp, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&fail), 4);
@@ -3533,7 +3533,7 @@ __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
 void
 __indirect_glDepthFunc(GLenum func)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&func), 4);
@@ -3547,7 +3547,7 @@ __indirect_glDepthFunc(GLenum func)
 void
 __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&xfactor), 4);
@@ -3562,7 +3562,7 @@ __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
 void
 __indirect_glPixelTransferf(GLenum pname, GLfloat param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
@@ -3577,7 +3577,7 @@ __indirect_glPixelTransferf(GLenum pname, GLfloat param)
 void
 __indirect_glPixelTransferi(GLenum pname, GLint param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
@@ -3592,7 +3592,7 @@ __indirect_glPixelTransferi(GLenum pname, GLint param)
 void
 __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
     if (mapsize < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -3629,7 +3629,7 @@ __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
 void
 __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4));
     if (mapsize < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -3666,7 +3666,7 @@ __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
 void
 __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2));
     if (mapsize < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -3703,7 +3703,7 @@ __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
 void
 __indirect_glReadBuffer(GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
@@ -3718,7 +3718,7 @@ void
 __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height,
                         GLenum type)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -3737,7 +3737,7 @@ void
 __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
                         GLenum format, GLenum type, GLvoid * pixels)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const __GLXattribute *const state = gc->client_state_private;
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
@@ -3786,7 +3786,7 @@ void
 __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format,
                         GLenum type, const GLvoid * pixels)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize =
         (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
                                          0) : 0;
@@ -3832,7 +3832,7 @@ __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format,
 void
 __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 4;
@@ -3867,7 +3867,7 @@ __indirect_glGetClipPlane(GLenum plane, GLdouble * equation)
 void
 __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -3907,7 +3907,7 @@ __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params)
 void
 __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -3947,7 +3947,7 @@ __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params)
 void
 __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -3985,7 +3985,7 @@ __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v)
 void
 __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -4023,7 +4023,7 @@ __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v)
 void
 __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -4061,7 +4061,7 @@ __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v)
 void
 __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -4101,7 +4101,7 @@ __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
 void
 __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -4141,7 +4141,7 @@ __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params)
 void
 __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 4;
@@ -4179,7 +4179,7 @@ __indirect_glGetPixelMapfv(GLenum map, GLfloat * values)
 void
 __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 4;
@@ -4218,7 +4218,7 @@ __indirect_glGetPixelMapuiv(GLenum map, GLuint * values)
 void
 __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 4;
@@ -4257,7 +4257,7 @@ __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
 void
 __indirect_glGetPolygonStipple(GLubyte *mask)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 4;
@@ -4294,7 +4294,7 @@ __indirect_glGetPolygonStipple(GLubyte *mask)
 void
 __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -4334,7 +4334,7 @@ __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params)
 void
 __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -4374,7 +4374,7 @@ __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params)
 void
 __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -4414,7 +4414,7 @@ __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params)
 void
 __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -4454,7 +4454,7 @@ __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params)
 void
 __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -4495,7 +4495,7 @@ void
 __indirect_glGetTexImage(GLenum target, GLint level, GLenum format,
                          GLenum type, GLvoid * pixels)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const __GLXattribute *const state = gc->client_state_private;
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
@@ -4542,7 +4542,7 @@ __indirect_glGetTexImage(GLenum target, GLint level, GLenum format,
 void
 __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -4583,7 +4583,7 @@ __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params)
 void
 __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -4625,7 +4625,7 @@ void
 __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname,
                                     GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 12;
@@ -4668,7 +4668,7 @@ void
 __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname,
                                     GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 12;
@@ -4710,7 +4710,7 @@ __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname,
 GLboolean
 __indirect_glIsList(GLuint list)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
 #ifndef USE_XCB
@@ -4742,7 +4742,7 @@ __indirect_glIsList(GLuint list)
 void
 __indirect_glDepthRange(GLclampd zNear, GLclampd zFar)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_DepthRange, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&zNear), 8);
@@ -4758,7 +4758,7 @@ void
 __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom,
                      GLdouble top, GLdouble zNear, GLdouble zFar)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 52;
     emit_header(gc->pc, X_GLrop_Frustum, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
@@ -4777,7 +4777,7 @@ __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom,
 void
 __indirect_glLoadIdentity(void)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 4;
     emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen);
     gc->pc += cmdlen;
@@ -4790,7 +4790,7 @@ __indirect_glLoadIdentity(void)
 void
 __indirect_glLoadMatrixf(const GLfloat * m)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 68;
     emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
@@ -4804,7 +4804,7 @@ __indirect_glLoadMatrixf(const GLfloat * m)
 void
 __indirect_glLoadMatrixd(const GLdouble * m)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 132;
     emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
@@ -4818,7 +4818,7 @@ __indirect_glLoadMatrixd(const GLdouble * m)
 void
 __indirect_glMatrixMode(GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
@@ -4832,7 +4832,7 @@ __indirect_glMatrixMode(GLenum mode)
 void
 __indirect_glMultMatrixf(const GLfloat * m)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 68;
     emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (m), 64);
@@ -4846,7 +4846,7 @@ __indirect_glMultMatrixf(const GLfloat * m)
 void
 __indirect_glMultMatrixd(const GLdouble * m)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 132;
     emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (m), 128);
@@ -4861,7 +4861,7 @@ void
 __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom,
                    GLdouble top, GLdouble zNear, GLdouble zFar)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 52;
     emit_header(gc->pc, X_GLrop_Ortho, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&left), 8);
@@ -4880,7 +4880,7 @@ __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom,
 void
 __indirect_glPopMatrix(void)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 4;
     emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen);
     gc->pc += cmdlen;
@@ -4893,7 +4893,7 @@ __indirect_glPopMatrix(void)
 void
 __indirect_glPushMatrix(void)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 4;
     emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen);
     gc->pc += cmdlen;
@@ -4906,7 +4906,7 @@ __indirect_glPushMatrix(void)
 void
 __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 36;
     emit_header(gc->pc, X_GLrop_Rotated, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 8);
@@ -4923,7 +4923,7 @@ __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
 void
 __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Rotatef, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&angle), 4);
@@ -4940,7 +4940,7 @@ __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
 void
 __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_Scaled, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
@@ -4956,7 +4956,7 @@ __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z)
 void
 __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Scalef, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -4972,7 +4972,7 @@ __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z)
 void
 __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_Translated, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 8);
@@ -4988,7 +4988,7 @@ __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z)
 void
 __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Translatef, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -5004,7 +5004,7 @@ __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
 void
 __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Viewport, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -5021,7 +5021,7 @@ __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
 void
 __indirect_glBindTexture(GLenum target, GLuint texture)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_BindTexture, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -5036,7 +5036,7 @@ __indirect_glBindTexture(GLenum target, GLuint texture)
 void
 __indirect_glIndexub(GLubyte c)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&c), 1);
@@ -5050,7 +5050,7 @@ __indirect_glIndexub(GLubyte c)
 void
 __indirect_glIndexubv(const GLubyte *c)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_Indexubv, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (c), 1);
@@ -5064,7 +5064,7 @@ __indirect_glIndexubv(const GLubyte *c)
 void
 __indirect_glPolygonOffset(GLfloat factor, GLfloat units)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&factor), 4);
@@ -5080,7 +5080,7 @@ void
 __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
                             GLint x, GLint y, GLsizei width, GLint border)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 32;
     emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -5102,7 +5102,7 @@ __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat,
                             GLint x, GLint y, GLsizei width, GLsizei height,
                             GLint border)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 36;
     emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -5124,7 +5124,7 @@ void
 __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset,
                                GLint x, GLint y, GLsizei width)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -5145,7 +5145,7 @@ __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset,
                                GLint yoffset, GLint x, GLint y, GLsizei width,
                                GLsizei height)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 36;
     emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -5166,7 +5166,7 @@ __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset,
 void
 __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
@@ -5196,7 +5196,7 @@ __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
 void
 glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -5204,7 +5204,7 @@ glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
         if (n < 0) {
@@ -5228,7 +5228,7 @@ glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
 void
 __indirect_glGenTextures(GLsizei n, GLuint * textures)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 4;
@@ -5267,7 +5267,7 @@ __indirect_glGenTextures(GLsizei n, GLuint * textures)
 void
 glGenTexturesEXT(GLsizei n, GLuint * textures)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -5275,7 +5275,7 @@ glGenTexturesEXT(GLsizei n, GLuint * textures)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 4;
         if (n < 0) {
@@ -5299,7 +5299,7 @@ glGenTexturesEXT(GLsizei n, GLuint * textures)
 GLboolean
 __indirect_glIsTexture(GLuint texture)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
 #ifndef USE_XCB
@@ -5332,7 +5332,7 @@ __indirect_glIsTexture(GLuint texture)
 GLboolean
 glIsTextureEXT(GLuint texture)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -5340,7 +5340,7 @@ glIsTextureEXT(GLuint texture)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         Display *const dpy = gc->currentDpy;
         GLboolean retval = (GLboolean) 0;
         const GLuint cmdlen = 4;
@@ -5362,7 +5362,7 @@ void
 __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures,
                                 const GLclampf * priorities)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -5387,7 +5387,7 @@ __glx_TexSubImage_1D2D(unsigned opcode, unsigned dim, GLenum target,
                        GLsizei width, GLsizei height, GLenum format,
                        GLenum type, const GLvoid * pixels)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize =
         (pixels != NULL) ? __glImageSize(width, height, 1, format, type,
                                          target) : 0;
@@ -5464,7 +5464,7 @@ void
 __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue,
                         GLclampf alpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_BlendColor, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -5481,7 +5481,7 @@ __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue,
 void
 __indirect_glBlendEquation(GLenum mode)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&mode), 4);
@@ -5496,7 +5496,7 @@ void
 __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width,
                         GLenum format, GLenum type, const GLvoid * table)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize =
         (table != NULL) ? __glImageSize(width, 1, 1, format, type,
                                         target) : 0;
@@ -5546,7 +5546,7 @@ void
 __indirect_glColorTableParameterfv(GLenum target, GLenum pname,
                                    const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glColorTableParameterfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen);
@@ -5564,7 +5564,7 @@ void
 __indirect_glColorTableParameteriv(GLenum target, GLenum pname,
                                    const GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glColorTableParameteriv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen);
@@ -5582,7 +5582,7 @@ void
 __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x,
                             GLint y, GLsizei width)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -5601,7 +5601,7 @@ void
 __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type,
                            GLvoid * table)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const __GLXattribute *const state = gc->client_state_private;
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
@@ -5648,7 +5648,7 @@ __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type,
 void
 glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -5656,7 +5656,7 @@ glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         const __GLXattribute *const state = gc->client_state_private;
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 16;
@@ -5683,7 +5683,7 @@ void
 __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname,
                                       GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -5724,7 +5724,7 @@ __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname,
 void
 glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -5733,7 +5733,7 @@ glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 8;
         if (__builtin_expect(dpy != NULL, 1)) {
@@ -5756,7 +5756,7 @@ void
 __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname,
                                       GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -5797,7 +5797,7 @@ __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname,
 void
 glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -5806,7 +5806,7 @@ glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 8;
         if (__builtin_expect(dpy != NULL, 1)) {
@@ -5829,7 +5829,7 @@ void
 __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count,
                            GLenum format, GLenum type, const GLvoid * data)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize =
         (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0;
     const GLuint cmdlen = 44 + __GLX_PAD(compsize);
@@ -5877,7 +5877,7 @@ void
 __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y,
                                GLsizei width)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -5897,7 +5897,7 @@ __glx_ConvolutionFilter_1D2D(unsigned opcode, unsigned dim, GLenum target,
                              GLsizei height, GLenum format, GLenum type,
                              const GLvoid * image)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize =
         (image != NULL) ? __glImageSize(width, height, 1, format, type,
                                         target) : 0;
@@ -5971,7 +5971,7 @@ void
 __indirect_glConvolutionParameterf(GLenum target, GLenum pname,
                                    GLfloat params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -5988,7 +5988,7 @@ void
 __indirect_glConvolutionParameterfv(GLenum target, GLenum pname,
                                     const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glConvolutionParameterfv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen);
@@ -6005,7 +6005,7 @@ __indirect_glConvolutionParameterfv(GLenum target, GLenum pname,
 void
 __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -6022,7 +6022,7 @@ void
 __indirect_glConvolutionParameteriv(GLenum target, GLenum pname,
                                     const GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glConvolutionParameteriv_size(pname);
     const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen);
@@ -6040,7 +6040,7 @@ void
 __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat,
                                      GLint x, GLint y, GLsizei width)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -6060,7 +6060,7 @@ __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat,
                                      GLint x, GLint y, GLsizei width,
                                      GLsizei height)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -6080,7 +6080,7 @@ void
 __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type,
                                   GLvoid * image)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const __GLXattribute *const state = gc->client_state_private;
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
@@ -6123,7 +6123,7 @@ void
 gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type,
                      GLvoid * image)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -6132,7 +6132,7 @@ gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type,
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         const __GLXattribute *const state = gc->client_state_private;
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 16;
@@ -6160,7 +6160,7 @@ void
 __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname,
                                        GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -6201,7 +6201,7 @@ __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname,
 void
 gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -6210,7 +6210,7 @@ gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 8;
         if (__builtin_expect(dpy != NULL, 1)) {
@@ -6233,7 +6233,7 @@ void
 __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname,
                                        GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -6274,7 +6274,7 @@ __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname,
 void
 gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -6283,7 +6283,7 @@ gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 8;
         if (__builtin_expect(dpy != NULL, 1)) {
@@ -6306,7 +6306,7 @@ void
 __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format,
                           GLenum type, GLvoid * values)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const __GLXattribute *const state = gc->client_state_private;
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
@@ -6354,7 +6354,7 @@ void
 gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format,
                      GLenum type, GLvoid * values)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -6363,7 +6363,7 @@ gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format,
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         const __GLXattribute *const state = gc->client_state_private;
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 16;
@@ -6391,7 +6391,7 @@ void
 __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname,
                                      GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -6431,7 +6431,7 @@ __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname,
 void
 gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -6439,7 +6439,7 @@ gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 8;
         if (__builtin_expect(dpy != NULL, 1)) {
@@ -6462,7 +6462,7 @@ void
 __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname,
                                      GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -6502,7 +6502,7 @@ __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname,
 void
 gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -6510,7 +6510,7 @@ gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 8;
         if (__builtin_expect(dpy != NULL, 1)) {
@@ -6533,7 +6533,7 @@ void
 __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format,
                        GLenum type, GLvoid * values)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const __GLXattribute *const state = gc->client_state_private;
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
@@ -6577,7 +6577,7 @@ void
 gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format,
                      GLenum type, GLvoid * values)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -6585,7 +6585,7 @@ gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format,
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         const __GLXattribute *const state = gc->client_state_private;
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 16;
@@ -6613,7 +6613,7 @@ void
 __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname,
                                   GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -6651,7 +6651,7 @@ __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname,
 void
 gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -6659,7 +6659,7 @@ gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 8;
         if (__builtin_expect(dpy != NULL, 1)) {
@@ -6681,7 +6681,7 @@ gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
 void
 __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -6719,7 +6719,7 @@ __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
 void
 gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     if (gc->driContext) {
@@ -6727,7 +6727,7 @@ gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
     } else
 #endif
     {
-        __GLXcontext *const gc = __glXGetCurrentContext();
+        struct glx_context *const gc = __glXGetCurrentContext();
         Display *const dpy = gc->currentDpy;
         const GLuint cmdlen = 8;
         if (__builtin_expect(dpy != NULL, 1)) {
@@ -6750,7 +6750,7 @@ void
 __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat,
                        GLboolean sink)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_Histogram, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -6767,7 +6767,7 @@ __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat,
 void
 __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_Minmax, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -6783,7 +6783,7 @@ __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
 void
 __indirect_glResetHistogram(GLenum target)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -6797,7 +6797,7 @@ __indirect_glResetHistogram(GLenum target)
 void
 __indirect_glResetMinmax(GLenum target)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -6813,7 +6813,7 @@ __glx_TexImage_3D4D(unsigned opcode, unsigned dim, GLenum target, GLint level,
                     GLsizei depth, GLsizei extent, GLint border,
                     GLenum format, GLenum type, const GLvoid * pixels)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize =
         (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
                                          target) : 0;
@@ -6890,7 +6890,7 @@ __glx_TexSubImage_3D4D(unsigned opcode, unsigned dim, GLenum target,
                        GLsizei height, GLsizei depth, GLsizei extent,
                        GLenum format, GLenum type, const GLvoid * pixels)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize =
         (pixels != NULL) ? __glImageSize(width, height, depth, format, type,
                                          target) : 0;
@@ -6968,7 +6968,7 @@ __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset,
                                GLint yoffset, GLint zoffset, GLint x, GLint y,
                                GLsizei width, GLsizei height)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 40;
     emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -6990,7 +6990,7 @@ __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset,
 void
 __indirect_glActiveTextureARB(GLenum texture)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&texture), 4);
@@ -7004,7 +7004,7 @@ __indirect_glActiveTextureARB(GLenum texture)
 void
 __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
@@ -7019,7 +7019,7 @@ __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s)
 void
 __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (v), 8);
@@ -7034,7 +7034,7 @@ __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v)
 void
 __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7049,7 +7049,7 @@ __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s)
 void
 __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7064,7 +7064,7 @@ __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v)
 void
 __indirect_glMultiTexCoord1iARB(GLenum target, GLint s)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7079,7 +7079,7 @@ __indirect_glMultiTexCoord1iARB(GLenum target, GLint s)
 void
 __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7094,7 +7094,7 @@ __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v)
 void
 __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7109,7 +7109,7 @@ __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s)
 void
 __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7124,7 +7124,7 @@ __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v)
 void
 __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
@@ -7140,7 +7140,7 @@ __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
 void
 __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (v), 16);
@@ -7155,7 +7155,7 @@ __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v)
 void
 __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7171,7 +7171,7 @@ __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
 void
 __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7186,7 +7186,7 @@ __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v)
 void
 __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7202,7 +7202,7 @@ __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
 void
 __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7217,7 +7217,7 @@ __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v)
 void
 __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7233,7 +7233,7 @@ __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
 void
 __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7249,7 +7249,7 @@ void
 __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t,
                                 GLdouble r)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 32;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
@@ -7266,7 +7266,7 @@ __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t,
 void
 __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 32;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (v), 24);
@@ -7282,7 +7282,7 @@ void
 __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t,
                                 GLfloat r)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7299,7 +7299,7 @@ __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t,
 void
 __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7314,7 +7314,7 @@ __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v)
 void
 __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7331,7 +7331,7 @@ __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
 void
 __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7347,7 +7347,7 @@ void
 __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t,
                                 GLshort r)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7364,7 +7364,7 @@ __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t,
 void
 __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7380,7 +7380,7 @@ void
 __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t,
                                 GLdouble r, GLdouble q)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 40;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&s), 8);
@@ -7398,7 +7398,7 @@ __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t,
 void
 __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 40;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (v), 32);
@@ -7414,7 +7414,7 @@ void
 __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t,
                                 GLfloat r, GLfloat q)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7432,7 +7432,7 @@ __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t,
 void
 __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7448,7 +7448,7 @@ void
 __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r,
                                 GLint q)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7466,7 +7466,7 @@ __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r,
 void
 __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7482,7 +7482,7 @@ void
 __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t,
                                 GLshort r, GLshort q)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7500,7 +7500,7 @@ __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t,
 void
 __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7515,7 +7515,7 @@ __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v)
 void
 __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_SampleCoverageARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
@@ -7530,7 +7530,7 @@ __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
 void
 __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -7550,7 +7550,7 @@ __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string)
 void
 __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -7571,7 +7571,7 @@ void
 __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x,
                                       GLdouble y, GLdouble z, GLdouble w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 44;
     emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7591,7 +7591,7 @@ void
 __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index,
                                        const GLdouble * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 44;
     emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7608,7 +7608,7 @@ void
 __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x,
                                       GLfloat y, GLfloat z, GLfloat w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7628,7 +7628,7 @@ void
 __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index,
                                        const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7646,7 +7646,7 @@ __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index,
                                         GLdouble x, GLdouble y, GLdouble z,
                                         GLdouble w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 44;
     emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7666,7 +7666,7 @@ void
 __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index,
                                          const GLdouble * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 44;
     emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7684,7 +7684,7 @@ __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index,
                                         GLfloat x, GLfloat y, GLfloat z,
                                         GLfloat w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7704,7 +7704,7 @@ void
 __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index,
                                          const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -7721,7 +7721,7 @@ void
 __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len,
                               const GLvoid * string)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16 + __GLX_PAD(len);
     if (len < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -7759,7 +7759,7 @@ __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len,
 void
 __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7774,7 +7774,7 @@ __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x)
 void
 __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7789,7 +7789,7 @@ __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v)
 void
 __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7804,7 +7804,7 @@ __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x)
 void
 __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7819,7 +7819,7 @@ __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v)
 void
 __indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7834,7 +7834,7 @@ __indirect_glVertexAttrib1sARB(GLuint index, GLshort x)
 void
 __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7849,7 +7849,7 @@ __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v)
 void
 __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7865,7 +7865,7 @@ __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
 void
 __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7880,7 +7880,7 @@ __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v)
 void
 __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7896,7 +7896,7 @@ __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
 void
 __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7911,7 +7911,7 @@ __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v)
 void
 __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7927,7 +7927,7 @@ __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
 void
 __indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7943,7 +7943,7 @@ void
 __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y,
                                GLdouble z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 32;
     emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7960,7 +7960,7 @@ __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y,
 void
 __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 32;
     emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7975,7 +7975,7 @@ __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v)
 void
 __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -7992,7 +7992,7 @@ __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
 void
 __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8007,7 +8007,7 @@ __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v)
 void
 __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8024,7 +8024,7 @@ __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
 void
 __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8039,7 +8039,7 @@ __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
 void
 __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte *v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8054,7 +8054,7 @@ __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte *v)
 void
 __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8069,7 +8069,7 @@ __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v)
 void
 __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8085,7 +8085,7 @@ void
 __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y,
                                  GLubyte z, GLubyte w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8103,7 +8103,7 @@ __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y,
 void
 __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte *v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8118,7 +8118,7 @@ __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte *v)
 void
 __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8133,7 +8133,7 @@ __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v)
 void
 __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8148,7 +8148,7 @@ __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
 void
 __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte *v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8164,7 +8164,7 @@ void
 __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y,
                                GLdouble z, GLdouble w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 40;
     emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8182,7 +8182,7 @@ __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y,
 void
 __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 40;
     emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8198,7 +8198,7 @@ void
 __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z,
                                GLfloat w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8216,7 +8216,7 @@ __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z,
 void
 __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8231,7 +8231,7 @@ __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v)
 void
 __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8247,7 +8247,7 @@ void
 __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z,
                                GLshort w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8265,7 +8265,7 @@ __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z,
 void
 __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8280,7 +8280,7 @@ __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
 void
 __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte *v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8295,7 +8295,7 @@ __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte *v)
 void
 __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8310,7 +8310,7 @@ __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v)
 void
 __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -8325,7 +8325,7 @@ __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v)
 void
 __indirect_glBeginQueryARB(GLenum target, GLuint id)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -8340,7 +8340,7 @@ __indirect_glBeginQueryARB(GLenum target, GLuint id)
 void
 __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
@@ -8370,7 +8370,7 @@ __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
 void
 __indirect_glEndQueryARB(GLenum target)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -8384,7 +8384,7 @@ __indirect_glEndQueryARB(GLenum target)
 void
 __indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 4;
@@ -8423,7 +8423,7 @@ __indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
 void
 __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -8461,7 +8461,7 @@ __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params)
 void
 __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -8499,7 +8499,7 @@ __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
 void
 __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
 #ifndef USE_XCB
     const GLuint cmdlen = 8;
@@ -8540,7 +8540,7 @@ __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params)
 GLboolean
 __indirect_glIsQueryARB(GLuint id)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
 #ifndef USE_XCB
@@ -8574,7 +8574,7 @@ __indirect_glIsQueryARB(GLuint id)
 void
 __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -8610,7 +8610,7 @@ __indirect_glRenderbufferStorageMultisample(GLenum target, GLsizei samples,
                                             GLenum internalformat,
                                             GLsizei width, GLsizei height)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_RenderbufferStorageMultisample, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -8628,7 +8628,7 @@ __indirect_glRenderbufferStorageMultisample(GLenum target, GLsizei samples,
 void
 __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&value), 4);
@@ -8643,7 +8643,7 @@ __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
 void
 __indirect_glSamplePatternSGIS(GLenum pattern)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&pattern), 4);
@@ -8657,7 +8657,7 @@ __indirect_glSamplePatternSGIS(GLenum pattern)
 void
 __indirect_glPointParameterfEXT(GLenum pname, GLfloat param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
@@ -8672,7 +8672,7 @@ __indirect_glPointParameterfEXT(GLenum pname, GLfloat param)
 void
 __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glPointParameterfvEXT_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen);
@@ -8688,7 +8688,7 @@ __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params)
 void
 __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
@@ -8711,7 +8711,7 @@ __indirect_glSecondaryColor3bvEXT(const GLbyte *v)
 void
 __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 8);
@@ -8734,7 +8734,7 @@ __indirect_glSecondaryColor3dvEXT(const GLdouble * v)
 void
 __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -8757,7 +8757,7 @@ __indirect_glSecondaryColor3fvEXT(const GLfloat * v)
 void
 __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -8780,7 +8780,7 @@ __indirect_glSecondaryColor3ivEXT(const GLint * v)
 void
 __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
@@ -8803,7 +8803,7 @@ __indirect_glSecondaryColor3svEXT(const GLshort * v)
 void
 __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 1);
@@ -8826,7 +8826,7 @@ __indirect_glSecondaryColor3ubvEXT(const GLubyte *v)
 void
 __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 4);
@@ -8849,7 +8849,7 @@ __indirect_glSecondaryColor3uivEXT(const GLuint * v)
 void
 __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&red), 2);
@@ -8872,7 +8872,7 @@ __indirect_glSecondaryColor3usvEXT(const GLushort * v)
 void
 __indirect_glFogCoorddEXT(GLdouble coord)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 8);
@@ -8893,7 +8893,7 @@ __indirect_glFogCoorddvEXT(const GLdouble * coord)
 void
 __indirect_glFogCoordfEXT(GLfloat coord)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&coord), 4);
@@ -8915,7 +8915,7 @@ void
 __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
                                   GLenum sfactorAlpha, GLenum dfactorAlpha)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&sfactorRGB), 4);
@@ -8932,7 +8932,7 @@ __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
 void
 __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&x), 4);
@@ -8956,7 +8956,7 @@ GLboolean
 __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids,
                                    GLboolean * residences)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
@@ -8981,7 +8981,7 @@ __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids,
 void
 __indirect_glBindProgramNV(GLenum target, GLuint program)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -8996,7 +8996,7 @@ __indirect_glBindProgramNV(GLenum target, GLuint program)
 void
 __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
     if (n < 0) {
@@ -9020,7 +9020,7 @@ void
 __indirect_glExecuteProgramNV(GLenum target, GLuint id,
                               const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -9036,7 +9036,7 @@ __indirect_glExecuteProgramNV(GLenum target, GLuint id,
 void
 __indirect_glGenProgramsNV(GLsizei n, GLuint * programs)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
     if (n < 0) {
@@ -9060,7 +9060,7 @@ void
 __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index,
                                      GLenum pname, GLdouble * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -9082,7 +9082,7 @@ void
 __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index,
                                      GLenum pname, GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -9103,7 +9103,7 @@ __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index,
 void
 __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte *program)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -9123,7 +9123,7 @@ __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte *program)
 void
 __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -9144,7 +9144,7 @@ void
 __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname,
                                 GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -9166,7 +9166,7 @@ void
 __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname,
                                  GLdouble * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -9186,7 +9186,7 @@ __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname,
 void
 __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -9206,7 +9206,7 @@ __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params)
 void
 __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -9226,7 +9226,7 @@ __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params)
 GLboolean
 __indirect_glIsProgramNV(GLuint program)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
     const GLuint cmdlen = 4;
@@ -9247,7 +9247,7 @@ void
 __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len,
                            const GLubyte *program)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16 + __GLX_PAD(len);
     if (len < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9271,7 +9271,7 @@ void
 __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num,
                                     const GLdouble * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16 + __GLX_PAD((num * 32));
     if (num < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9295,7 +9295,7 @@ void
 __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num,
                                     const GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16 + __GLX_PAD((num * 16));
     if (num < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9318,7 +9318,7 @@ __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num,
 void
 __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9340,7 +9340,7 @@ void
 __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix,
                            GLenum transform)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -9357,7 +9357,7 @@ __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix,
 void
 __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9372,7 +9372,7 @@ __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x)
 void
 __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9387,7 +9387,7 @@ __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v)
 void
 __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9402,7 +9402,7 @@ __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x)
 void
 __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9417,7 +9417,7 @@ __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v)
 void
 __indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9432,7 +9432,7 @@ __indirect_glVertexAttrib1sNV(GLuint index, GLshort x)
 void
 __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9447,7 +9447,7 @@ __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v)
 void
 __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9463,7 +9463,7 @@ __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
 void
 __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9478,7 +9478,7 @@ __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v)
 void
 __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9494,7 +9494,7 @@ __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
 void
 __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9509,7 +9509,7 @@ __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v)
 void
 __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9525,7 +9525,7 @@ __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
 void
 __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9541,7 +9541,7 @@ void
 __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y,
                               GLdouble z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 32;
     emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9558,7 +9558,7 @@ __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y,
 void
 __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 32;
     emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9573,7 +9573,7 @@ __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v)
 void
 __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9590,7 +9590,7 @@ __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
 void
 __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9605,7 +9605,7 @@ __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v)
 void
 __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9622,7 +9622,7 @@ __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
 void
 __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9638,7 +9638,7 @@ void
 __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y,
                               GLdouble z, GLdouble w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 40;
     emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9656,7 +9656,7 @@ __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y,
 void
 __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 40;
     emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9672,7 +9672,7 @@ void
 __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z,
                               GLfloat w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9690,7 +9690,7 @@ __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z,
 void
 __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9706,7 +9706,7 @@ void
 __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z,
                               GLshort w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9724,7 +9724,7 @@ __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z,
 void
 __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 16;
     emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9740,7 +9740,7 @@ void
 __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z,
                                GLubyte w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9758,7 +9758,7 @@ __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z,
 void
 __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte *v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&index), 4);
@@ -9773,7 +9773,7 @@ __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte *v)
 void
 __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9795,7 +9795,7 @@ __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v)
 void
 __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9817,7 +9817,7 @@ __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v)
 void
 __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9839,7 +9839,7 @@ __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v)
 void
 __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9861,7 +9861,7 @@ __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
 void
 __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9883,7 +9883,7 @@ __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
 void
 __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9905,7 +9905,7 @@ __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
 void
 __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 24));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9927,7 +9927,7 @@ __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
 void
 __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 12));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9949,7 +9949,7 @@ __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
 void
 __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 6));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9971,7 +9971,7 @@ __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
 void
 __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 32));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -9993,7 +9993,7 @@ __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
 void
 __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 16));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -10015,7 +10015,7 @@ __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
 void
 __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -10037,7 +10037,7 @@ __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
 void
 __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -10059,7 +10059,7 @@ __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
 void
 __indirect_glPointParameteriNV(GLenum pname, GLint param)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&pname), 4);
@@ -10074,7 +10074,7 @@ __indirect_glPointParameteriNV(GLenum pname, GLint param)
 void
 __indirect_glPointParameterivNV(GLenum pname, const GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint compsize = __glPointParameterivNV_size(pname);
     const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4));
     emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen);
@@ -10090,7 +10090,7 @@ __indirect_glPointParameterivNV(GLenum pname, const GLint * params)
 void
 __indirect_glActiveStencilFaceEXT(GLenum face)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&face), 4);
@@ -10106,7 +10106,7 @@ __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len,
                                           const GLubyte *name,
                                           GLdouble * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 8 + __GLX_PAD(len);
     if (len < 0) {
@@ -10134,7 +10134,7 @@ __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len,
                                           const GLubyte *name,
                                           GLfloat * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 8 + __GLX_PAD(len);
     if (len < 0) {
@@ -10162,7 +10162,7 @@ __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len,
                                        const GLubyte *name, GLdouble x,
                                        GLdouble y, GLdouble z, GLdouble w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 44 + __GLX_PAD(len);
     if (len < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -10190,7 +10190,7 @@ __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len,
                                         const GLubyte *name,
                                         const GLdouble * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 44 + __GLX_PAD(len);
     if (len < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -10215,7 +10215,7 @@ __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len,
                                        const GLubyte *name, GLfloat x,
                                        GLfloat y, GLfloat z, GLfloat w)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28 + __GLX_PAD(len);
     if (len < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -10243,7 +10243,7 @@ __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len,
                                         const GLubyte *name,
                                         const GLfloat * v)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28 + __GLX_PAD(len);
     if (len < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -10266,7 +10266,7 @@ __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len,
 void
 __indirect_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_BlendEquationSeparateEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&modeRGB), 4);
@@ -10281,7 +10281,7 @@ __indirect_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
 void
 __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -10296,7 +10296,7 @@ __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer)
 void
 __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 12;
     emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -10311,7 +10311,7 @@ __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
 GLenum
 __indirect_glCheckFramebufferStatusEXT(GLenum target)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     GLenum retval = (GLenum) 0;
     const GLuint cmdlen = 4;
@@ -10332,7 +10332,7 @@ __indirect_glCheckFramebufferStatusEXT(GLenum target)
 void
 __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -10354,7 +10354,7 @@ __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers)
 void
 __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
     if (n < 0) {
         __glXSetError(gc, GL_INVALID_VALUE);
@@ -10378,7 +10378,7 @@ __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment,
                                         GLenum renderbuffertarget,
                                         GLuint renderbuffer)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -10397,7 +10397,7 @@ __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment,
                                      GLenum textarget, GLuint texture,
                                      GLint level)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -10417,7 +10417,7 @@ __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment,
                                      GLenum textarget, GLuint texture,
                                      GLint level)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -10437,7 +10437,7 @@ __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment,
                                      GLenum textarget, GLuint texture,
                                      GLint level, GLint zoffset)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 28;
     emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -10456,7 +10456,7 @@ __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment,
 void
 __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
     if (n < 0) {
@@ -10479,7 +10479,7 @@ __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers)
 void
 __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 4;
     if (n < 0) {
@@ -10502,7 +10502,7 @@ __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers)
 void
 __indirect_glGenerateMipmapEXT(GLenum target)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 8;
     emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -10519,7 +10519,7 @@ __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target,
                                                     GLenum pname,
                                                     GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 12;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -10542,7 +10542,7 @@ void
 __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname,
                                            GLint * params)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     const GLuint cmdlen = 8;
     if (__builtin_expect(dpy != NULL, 1)) {
@@ -10563,7 +10563,7 @@ __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname,
 GLboolean
 __indirect_glIsFramebufferEXT(GLuint framebuffer)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
     const GLuint cmdlen = 4;
@@ -10583,7 +10583,7 @@ __indirect_glIsFramebufferEXT(GLuint framebuffer)
 GLboolean
 __indirect_glIsRenderbufferEXT(GLuint renderbuffer)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     Display *const dpy = gc->currentDpy;
     GLboolean retval = (GLboolean) 0;
     const GLuint cmdlen = 4;
@@ -10604,7 +10604,7 @@ void
 __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat,
                                     GLsizei width, GLsizei height)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 20;
     emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
@@ -10624,7 +10624,7 @@ __indirect_glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1,
                                 GLint dstX1, GLint dstY1, GLbitfield mask,
                                 GLenum filter)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 44;
     emit_header(gc->pc, X_GLrop_BlitFramebufferEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&srcX0), 4);
@@ -10649,7 +10649,7 @@ __indirect_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment,
                                         GLuint texture, GLint level,
                                         GLint layer)
 {
-    __GLXcontext *const gc = __glXGetCurrentContext();
+    struct glx_context *const gc = __glXGetCurrentContext();
     const GLuint cmdlen = 24;
     emit_header(gc->pc, X_GLrop_FramebufferTextureLayerEXT, cmdlen);
     (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4);
index b09b61a..36d68b0 100644 (file)
@@ -59,15 +59,15 @@ extern HIDDEN NOINLINE CARD32 __glXReadReply( Display *dpy, size_t size,
     void * dest, GLboolean reply_is_always_array );
 
 extern HIDDEN NOINLINE void __glXReadPixelReply( Display *dpy,
-    __GLXcontext * gc, unsigned max_dim, GLint width, GLint height,
+    struct glx_context * gc, unsigned max_dim, GLint width, GLint height,
     GLint depth, GLenum format, GLenum type, void * dest,
     GLboolean dimensions_in_reply );
 
 extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupSingleRequest(
-    __GLXcontext * gc, GLint sop, GLint cmdlen );
+    struct glx_context * gc, GLint sop, GLint cmdlen );
 
 extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupVendorRequest(
-    __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen );
+    struct glx_context * gc, GLint code, GLint vop, GLint cmdlen );
 
 extern HIDDEN void __indirect_glNewList(GLuint list, GLenum mode);
 extern HIDDEN void __indirect_glEndList(void);
index 73ca993..ea05188 100644 (file)
@@ -53,13 +53,13 @@ static int NoOp(void)
  * Create and initialize a new GL dispatch table.  The table is initialized
  * with GLX indirect rendering protocol functions.
  */
-__GLapi * __glXNewIndirectAPI( void )
+struct _glapi_table *__glXNewIndirectAPI( void )
 {
-    __GLapi *glAPI;
+    struct _glapi_table *glAPI;
     GLuint entries;
 
     entries = _glapi_get_dispatch_table_size();
-    glAPI = (__GLapi *) Xmalloc(entries * sizeof(void *));
+    glAPI = (struct _glapi_table *) Xmalloc(entries * sizeof(void *));
 
     /* first, set all entries to point to no-op functions */
     {
index 72255f1..2ba01f5 100644 (file)
@@ -36,6 +36,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include "glxclient.h"
 
-extern __GLapi *__glXNewIndirectAPI(void);
+extern struct _glapi_table *__glXNewIndirectAPI(void);
 
 #endif /* _INDIRECT_INIT_H_ */
index ec0e654..372618d 100644 (file)
@@ -84,9 +84,9 @@ static struct array_state *get_array_entry(const struct array_state_vector
                                            *arrays, GLenum key,
                                            unsigned index);
 static void fill_array_info_cache(struct array_state_vector *arrays);
-static GLboolean validate_mode(__GLXcontext * gc, GLenum mode);
-static GLboolean validate_count(__GLXcontext * gc, GLsizei count);
-static GLboolean validate_type(__GLXcontext * gc, GLenum type);
+static GLboolean validate_mode(struct glx_context * gc, GLenum mode);
+static GLboolean validate_count(struct glx_context * gc, GLsizei count);
+static GLboolean validate_type(struct glx_context * gc, GLenum type);
 
 
 /**
@@ -109,7 +109,7 @@ const GLuint __glXTypeSize_table[16] = {
  * __glXInitVertexArrayState().
  */
 void
-__glXFreeVertexArrayState(__GLXcontext * gc)
+__glXFreeVertexArrayState(struct glx_context * gc)
 {
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
@@ -135,8 +135,8 @@ __glXFreeVertexArrayState(__GLXcontext * gc)
  * \param gc  GLX context whose vertex array state is to be initialized.
  *
  * \warning
- * This function may only be called after __GLXcontext::gl_extension_bits,
- * __GLXcontext::server_minor, and __GLXcontext::server_major have been
+ * This function may only be called after struct glx_context::gl_extension_bits,
+ * struct glx_context::server_minor, and __GLXcontext::server_major have been
  * initialized.  These values are used to determine what vertex arrays are
  * supported.
  *
@@ -144,7 +144,7 @@ __glXFreeVertexArrayState(__GLXcontext * gc)
  * Return values from malloc are not properly tested.
  */
 void
-__glXInitVertexArrayState(__GLXcontext * gc)
+__glXInitVertexArrayState(struct glx_context * gc)
 {
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays;
@@ -487,7 +487,7 @@ fill_array_info_cache(struct array_state_vector *arrays)
 void
 emit_DrawArrays_none(GLenum mode, GLint first, GLsizei count)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    const __GLXattribute *state =
       (const __GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
@@ -549,7 +549,7 @@ emit_DrawArrays_none(GLenum mode, GLint first, GLsizei count)
  * A pointer to the buffer for array data.
  */
 static GLubyte *
-emit_DrawArrays_header_old(__GLXcontext * gc,
+emit_DrawArrays_header_old(struct glx_context * gc,
                            struct array_state_vector *arrays,
                            size_t * elements_per_request,
                            unsigned int *total_requests,
@@ -658,7 +658,7 @@ emit_DrawArrays_header_old(__GLXcontext * gc,
 void
 emit_DrawArrays_old(GLenum mode, GLint first, GLsizei count)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    const __GLXattribute *state =
       (const __GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
@@ -720,7 +720,7 @@ void
 emit_DrawElements_none(GLenum mode, GLsizei count, GLenum type,
                        const GLvoid * indices)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    const __GLXattribute *state =
       (const __GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
@@ -787,7 +787,7 @@ void
 emit_DrawElements_old(GLenum mode, GLsizei count, GLenum type,
                       const GLvoid * indices)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    const __GLXattribute *state =
       (const __GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
@@ -875,7 +875,7 @@ emit_DrawElements_old(GLenum mode, GLsizei count, GLenum type,
  * \c GL_TRUE if the argument is valid, \c GL_FALSE if is not.
  */
 static GLboolean
-validate_mode(__GLXcontext * gc, GLenum mode)
+validate_mode(struct glx_context * gc, GLenum mode)
 {
    switch (mode) {
    case GL_POINTS:
@@ -908,7 +908,7 @@ validate_mode(__GLXcontext * gc, GLenum mode)
  * \c GL_TRUE if the argument is valid, \c GL_FALSE if it is not.
  */
 static GLboolean
-validate_count(__GLXcontext * gc, GLsizei count)
+validate_count(struct glx_context * gc, GLsizei count)
 {
    if (count < 0) {
       __glXSetError(gc, GL_INVALID_VALUE);
@@ -927,7 +927,7 @@ validate_count(__GLXcontext * gc, GLsizei count)
  * \c GL_TRUE if the argument is valid, \c GL_FALSE if it is not.
  */
 static GLboolean
-validate_type(__GLXcontext * gc, GLenum type)
+validate_type(struct glx_context * gc, GLenum type)
 {
    switch (type) {
    case GL_UNSIGNED_INT:
@@ -944,7 +944,7 @@ validate_type(__GLXcontext * gc, GLenum type)
 void
 __indirect_glDrawArrays(GLenum mode, GLint first, GLsizei count)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    const __GLXattribute *state =
       (const __GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
@@ -963,7 +963,7 @@ __indirect_glDrawArrays(GLenum mode, GLint first, GLsizei count)
 void
 __indirect_glArrayElement(GLint index)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    const __GLXattribute *state =
       (const __GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
@@ -989,7 +989,7 @@ void
 __indirect_glDrawElements(GLenum mode, GLsizei count, GLenum type,
                           const GLvoid * indices)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    const __GLXattribute *state =
       (const __GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
@@ -1011,7 +1011,7 @@ __indirect_glDrawRangeElements(GLenum mode, GLuint start, GLuint end,
                                GLsizei count, GLenum type,
                                const GLvoid * indices)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    const __GLXattribute *state =
       (const __GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
@@ -1037,7 +1037,7 @@ void
 __indirect_glMultiDrawArraysEXT(GLenum mode, GLint * first, GLsizei * count,
                                 GLsizei primcount)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    const __GLXattribute *state =
       (const __GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
@@ -1063,7 +1063,7 @@ __indirect_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count,
                                   GLenum type, const GLvoid ** indices,
                                   GLsizei primcount)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    const __GLXattribute *state =
       (const __GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
@@ -1119,7 +1119,7 @@ __indirect_glVertexPointer(GLint size, GLenum type, GLsizei stride,
       0, 0, X_GLrop_Vertex2dv, X_GLrop_Vertex3dv, X_GLrop_Vertex4dv
    };
    uint16_t opcode;
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
    struct array_state *a;
@@ -1164,7 +1164,7 @@ __indirect_glNormalPointer(GLenum type, GLsizei stride,
                            const GLvoid * pointer)
 {
    uint16_t opcode;
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
    struct array_state *a;
@@ -1235,7 +1235,7 @@ __indirect_glColorPointer(GLint size, GLenum type, GLsizei stride,
       0, 0, 0, X_GLrop_Color3dv, X_GLrop_Color4dv
    };
    uint16_t opcode;
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
    struct array_state *a;
@@ -1290,7 +1290,7 @@ void
 __indirect_glIndexPointer(GLenum type, GLsizei stride, const GLvoid * pointer)
 {
    uint16_t opcode;
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
    struct array_state *a;
@@ -1335,7 +1335,7 @@ __indirect_glIndexPointer(GLenum type, GLsizei stride, const GLvoid * pointer)
 void
 __indirect_glEdgeFlagPointer(GLsizei stride, const GLvoid * pointer)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
    struct array_state *a;
@@ -1397,7 +1397,7 @@ __indirect_glTexCoordPointer(GLint size, GLenum type, GLsizei stride,
    };
 
    uint16_t opcode;
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
    struct array_state *a;
@@ -1470,7 +1470,7 @@ __indirect_glSecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride,
                                       const GLvoid * pointer)
 {
    uint16_t opcode;
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
    struct array_state *a;
@@ -1530,7 +1530,7 @@ __indirect_glFogCoordPointerEXT(GLenum type, GLsizei stride,
                                 const GLvoid * pointer)
 {
    uint16_t opcode;
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
    struct array_state *a;
@@ -1577,7 +1577,7 @@ __indirect_glVertexAttribPointerARB(GLuint index, GLint size,
    static const uint16_t double_ops[5] = { 0, 4197, 4198, 4199, 4200 };
 
    uint16_t opcode;
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *arrays = state->array_state;
    struct array_state *a;
@@ -1690,7 +1690,7 @@ __indirect_glVertexAttribPointerNV(GLuint index, GLint size,
                                    GLenum type, GLsizei stride,
                                    const GLvoid * pointer)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    GLboolean normalized = GL_FALSE;
 
 
@@ -1718,7 +1718,7 @@ __indirect_glVertexAttribPointerNV(GLuint index, GLint size,
 void
 __indirect_glClientActiveTextureARB(GLenum texture)
 {
-   __GLXcontext *const gc = __glXGetCurrentContext();
+   struct glx_context *const gc = __glXGetCurrentContext();
    __GLXattribute *const state =
       (__GLXattribute *) (gc->client_state_private);
    struct array_state_vector *const arrays = state->array_state;
index d822a7e..d955fdf 100644 (file)
@@ -37,7 +37,7 @@
 static void
 do_vertex_attrib_enable(GLuint index, GLboolean val)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
 
    if (!__glXSetArrayEnable(state, GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB,
@@ -65,7 +65,7 @@ static void
 get_parameter(unsigned opcode, unsigned size, GLenum target, GLuint index,
               void *params)
 {
-   __GLXcontext *const gc = __glXGetCurrentContext();
+   struct glx_context *const gc = __glXGetCurrentContext();
    Display *const dpy = gc->currentDpy;
    const GLuint cmdlen = 12;
 
@@ -122,7 +122,7 @@ void
 __indirect_glGetVertexAttribPointervNV(GLuint index, GLenum pname,
                                        GLvoid ** pointer)
 {
-   __GLXcontext *const gc = __glXGetCurrentContext();
+   struct glx_context *const gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
 
    if (pname != GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB) {
@@ -177,7 +177,7 @@ get_attrib_array_data(__GLXattribute * state, GLuint index, GLenum cap,
 
 
 static void
-get_vertex_attrib(__GLXcontext * gc, unsigned vop,
+get_vertex_attrib(struct glx_context * gc, unsigned vop,
                   GLuint index, GLenum pname, xReply * reply)
 {
    Display *const dpy = gc->currentDpy;
@@ -195,7 +195,7 @@ get_vertex_attrib(__GLXcontext * gc, unsigned vop,
 void
 __indirect_glGetVertexAttribivARB(GLuint index, GLenum pname, GLint * params)
 {
-   __GLXcontext *const gc = __glXGetCurrentContext();
+   struct glx_context *const gc = __glXGetCurrentContext();
    Display *const dpy = gc->currentDpy;
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    xGLXSingleReply reply;
@@ -229,7 +229,7 @@ void
 __indirect_glGetVertexAttribfvARB(GLuint index, GLenum pname,
                                   GLfloat * params)
 {
-   __GLXcontext *const gc = __glXGetCurrentContext();
+   struct glx_context *const gc = __glXGetCurrentContext();
    Display *const dpy = gc->currentDpy;
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    xGLXSingleReply reply;
@@ -263,7 +263,7 @@ void
 __indirect_glGetVertexAttribdvARB(GLuint index, GLenum pname,
                                   GLdouble * params)
 {
-   __GLXcontext *const gc = __glXGetCurrentContext();
+   struct glx_context *const gc = __glXGetCurrentContext();
    Display *const dpy = gc->currentDpy;
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    xGLXSingleReply reply;
index 30f6d44..4266d5c 100644 (file)
@@ -54,7 +54,7 @@
 
 /* Setup for all commands */
 #define __GLX_DECLARE_VARIABLES()               \
-   __GLXcontext *gc;                            \
+   struct glx_context *gc;                            \
    GLubyte *pc, *pixelHeaderPC;                 \
    GLuint compsize, cmdlen
 
index f33a873..037265a 100644 (file)
@@ -49,7 +49,7 @@
 
 /* Declare common variables used during a single command */
 #define __GLX_SINGLE_DECLARE_VARIABLES()         \
-   __GLXcontext *gc = __glXGetCurrentContext();  \
+   struct glx_context *gc = __glXGetCurrentContext();  \
    GLubyte *pc, *pixelHeaderPC;                  \
    GLuint compsize, cmdlen;                      \
    Display *dpy = gc->currentDpy;                \
index d36ca31..d508d62 100644 (file)
@@ -80,7 +80,7 @@ static const GLubyte HighBitsMask[9] = {
 ** set of pixel modes that are to be done by the server.
 */
 static void
-FillBitmap(__GLXcontext * gc, GLint width, GLint height,
+FillBitmap(struct glx_context * gc, GLint width, GLint height,
            GLenum format, const GLvoid * userdata, GLubyte * destImage)
 {
    const __GLXattribute *state = gc->client_state_private;
@@ -161,7 +161,7 @@ FillBitmap(__GLXcontext * gc, GLint width, GLint height,
 ** ALIGNMENT = 1.
 */
 void
-__glFillImage(__GLXcontext * gc, GLint dim, GLint width, GLint height,
+__glFillImage(struct glx_context * gc, GLint dim, GLint width, GLint height,
               GLint depth, GLenum format, GLenum type,
               const GLvoid * userdata, GLubyte * newimage, GLubyte * modes)
 {
@@ -268,7 +268,7 @@ __glFillImage(__GLXcontext * gc, GLint dim, GLint width, GLint height,
 ** into the clients memory using the pixel store PACK modes.
 */
 static void
-EmptyBitmap(__GLXcontext * gc, GLint width, GLint height,
+EmptyBitmap(struct glx_context * gc, GLint width, GLint height,
             GLenum format, const GLubyte * sourceImage, GLvoid * userdata)
 {
    const __GLXattribute *state = gc->client_state_private;
@@ -388,7 +388,7 @@ EmptyBitmap(__GLXcontext * gc, GLint width, GLint height,
 */
 /* ARGSUSED */
 void
-__glEmptyImage(__GLXcontext * gc, GLint dim, GLint width, GLint height,
+__glEmptyImage(struct glx_context * gc, GLint dim, GLint width, GLint height,
                GLint depth, GLenum format, GLenum type,
                const GLubyte * sourceImage, GLvoid * userdata)
 {
index dc193b9..1d776b8 100644 (file)
@@ -46,7 +46,7 @@
  * \sa __indirect_glPixelStorei,  __indirect_glPixelStoref
  */
 static void
-send_PixelStore(__GLXcontext * gc, unsigned sop, GLenum pname,
+send_PixelStore(struct glx_context * gc, unsigned sop, GLenum pname,
                 const void *param)
 {
    Display *const dpy = gc->currentDpy;
@@ -67,7 +67,7 @@ send_PixelStore(__GLXcontext * gc, unsigned sop, GLenum pname,
 void
 __indirect_glPixelStoref(GLenum pname, GLfloat param)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = gc->client_state_private;
    Display *dpy = gc->currentDpy;
    GLuint a;
@@ -217,7 +217,7 @@ __indirect_glPixelStoref(GLenum pname, GLfloat param)
 void
 __indirect_glPixelStorei(GLenum pname, GLint param)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = gc->client_state_private;
    Display *dpy = gc->currentDpy;
 
index 9919bbc..8234bbe 100644 (file)
@@ -82,7 +82,7 @@
  * broken.
  */
 void
-__glXSendLargeImage(__GLXcontext * gc, GLint compsize, GLint dim,
+__glXSendLargeImage(struct glx_context * gc, GLint compsize, GLint dim,
                     GLint width, GLint height, GLint depth,
                     GLenum format, GLenum type, const GLvoid * src,
                     GLubyte * pc, GLubyte * modes)
index a146195..318d18e 100644 (file)
@@ -156,7 +156,7 @@ __indirect_glGetError(void)
  * On success \c GL_TRUE is returned.  Otherwise, \c GL_FALSE is returned.
  */
 static GLboolean
-get_client_data(__GLXcontext * gc, GLenum cap, GLintptr * data)
+get_client_data(struct glx_context * gc, GLenum cap, GLintptr * data)
 {
    GLboolean retval = GL_TRUE;
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
@@ -646,7 +646,7 @@ version_from_string(const char *ver, int *major_version, int *minor_version)
 const GLubyte *
 __indirect_glGetString(GLenum name)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    Display *dpy = gc->currentDpy;
    GLubyte *s = NULL;
 
@@ -837,7 +837,7 @@ __indirect_glIsEnabled(GLenum cap)
 void
 __indirect_glGetPointerv(GLenum pname, void **params)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
    Display *dpy = gc->currentDpy;
 
@@ -885,7 +885,7 @@ GLboolean
 __indirect_glAreTexturesResident(GLsizei n, const GLuint * textures,
                                  GLboolean * residences)
 {
-   __GLXcontext *const gc = __glXGetCurrentContext();
+   struct glx_context *const gc = __glXGetCurrentContext();
    Display *const dpy = gc->currentDpy;
    GLboolean retval = (GLboolean) 0;
    const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
@@ -941,14 +941,14 @@ GLboolean
 glAreTexturesResidentEXT(GLsizei n, const GLuint * textures,
                          GLboolean * residences)
 {
-   __GLXcontext *const gc = __glXGetCurrentContext();
+   struct glx_context *const gc = __glXGetCurrentContext();
 
    if (gc->isDirect) {
       return CALL_AreTexturesResident(GET_DISPATCH(),
                                       (n, textures, residences));
    }
    else {
-      __GLXcontext *const gc = __glXGetCurrentContext();
+      struct glx_context *const gc = __glXGetCurrentContext();
       Display *const dpy = gc->currentDpy;
       GLboolean retval = (GLboolean) 0;
       const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
index c4010d7..edb8858 100644 (file)
@@ -117,7 +117,7 @@ void NAME(_gloffset_GetSeparableFilter) (GLenum target, GLenum format,
                                          GLenum type, GLvoid * row,
                                          GLvoid * column, GLvoid * span)
 {
-   __GLXcontext *const gc = __glXGetCurrentContext();
+   struct glx_context *const gc = __glXGetCurrentContext();
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
    if (gc->driContext) {
index 398cfb1..609cafa 100644 (file)
@@ -101,7 +101,7 @@ void
 __indirect_glInterleavedArrays(GLenum format, GLsizei stride,
                                const GLvoid * pointer)
 {
-   __GLXcontext *gc = __glXGetCurrentContext();
+   struct glx_context *gc = __glXGetCurrentContext();
    __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
 
 #define NONE  {0, 0, 0}
index db3a570..4ca2c8f 100644 (file)
@@ -212,7 +212,7 @@ isvalid(XFontStruct * fs, int which)
 }
 
 _X_HIDDEN void
-DRI_glXUseXFont(GLXContext CC, Font font, int first, int count, int listbase)
+DRI_glXUseXFont(struct glx_context *CC, Font font, int first, int count, int listbase)
 {
    Display *dpy;
    Window win;
index 31745fc..887f631 100644 (file)
@@ -384,9 +384,9 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
                print '    int error;'
 
                if self.do_swap:
-                   print '    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);'
+                   print '    struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);'
                else:
-                   print '    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);'
+                   print '    struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);'
 
                print ''
                if name not in f.glx_vendorpriv_names:
index e732282..08f332f 100644 (file)
@@ -220,7 +220,7 @@ __glXReadReply( Display *dpy, size_t size, void * dest, GLboolean reply_is_alway
 }
 
 NOINLINE void
-__glXReadPixelReply( Display *dpy, __GLXcontext * gc, unsigned max_dim,
+__glXReadPixelReply( Display *dpy, struct glx_context * gc, unsigned max_dim,
     GLint width, GLint height, GLint depth, GLenum format, GLenum type,
     void * dest, GLboolean dimensions_in_reply )
 {
@@ -264,7 +264,7 @@ __glXReadPixelReply( Display *dpy, __GLXcontext * gc, unsigned max_dim,
 #define X_GLXSingle 0
 
 NOINLINE FASTCALL GLubyte *
-__glXSetupSingleRequest( __GLXcontext * gc, GLint sop, GLint cmdlen )
+__glXSetupSingleRequest( struct glx_context * gc, GLint sop, GLint cmdlen )
 {
     xGLXSingleReq * req;
     Display * const dpy = gc->currentDpy;
@@ -279,7 +279,7 @@ __glXSetupSingleRequest( __GLXcontext * gc, GLint sop, GLint cmdlen )
 }
 
 NOINLINE FASTCALL GLubyte *
-__glXSetupVendorRequest( __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen )
+__glXSetupVendorRequest( struct glx_context * gc, GLint code, GLint vop, GLint cmdlen )
 {
     xGLXVendorPrivateReq * req;
     Display * const dpy = gc->currentDpy;
@@ -371,7 +371,7 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
                                print '#define %s %d' % (func.opcode_vendor_name(name), func.glx_vendorpriv)
                                print '%s gl%s(%s)' % (func.return_type, func_name, func.get_parameter_string())
                                print '{'
-                               print '    __GLXcontext * const gc = __glXGetCurrentContext();'
+                               print '    struct glx_context * const gc = __glXGetCurrentContext();'
                                print ''
                                print '#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)'
                                print '    if (gc->driContext) {'
@@ -408,7 +408,7 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
                print """static FASTCALL NOINLINE void
 generic_%u_byte( GLint rop, const void * ptr )
 {
-    __GLXcontext * const gc = __glXGetCurrentContext();
+    struct glx_context * const gc = __glXGetCurrentContext();
     const GLuint cmdlen = %u;
 
     emit_header(gc->pc, rop, cmdlen);
@@ -523,7 +523,7 @@ generic_%u_byte( GLint rop, const void * ptr )
 
 
        def common_func_print_just_start(self, f, name):
-               print '    __GLXcontext * const gc = __glXGetCurrentContext();'
+               print '    struct glx_context * const gc = __glXGetCurrentContext();'
 
                # The only reason that single and vendor private commands need
                # a variable called 'dpy' is becuase they use the SyncHandle
@@ -971,15 +971,15 @@ extern HIDDEN NOINLINE CARD32 __glXReadReply( Display *dpy, size_t size,
     void * dest, GLboolean reply_is_always_array );
 
 extern HIDDEN NOINLINE void __glXReadPixelReply( Display *dpy,
-    __GLXcontext * gc, unsigned max_dim, GLint width, GLint height,
+    struct glx_context * gc, unsigned max_dim, GLint width, GLint height,
     GLint depth, GLenum format, GLenum type, void * dest,
     GLboolean dimensions_in_reply );
 
 extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupSingleRequest(
-    __GLXcontext * gc, GLint sop, GLint cmdlen );
+    struct glx_context * gc, GLint sop, GLint cmdlen );
 
 extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupVendorRequest(
-    __GLXcontext * gc, GLint code, GLint vop, GLint cmdlen );
+    struct glx_context * gc, GLint code, GLint vop, GLint cmdlen );
 """