summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11/glxapi.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-11-25 23:25:33 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-11-25 23:25:33 +0000
commitbe2de8b299c9fc7bdc22372ed799e894a8582c62 (patch)
tree4acb632c309ffee3f2f87f91c0818965d50fe575 /src/mesa/drivers/x11/glxapi.c
parent4dafbc3dc75be565704f437016f70a63c48d1539 (diff)
Use __GLXextFuncPtr type instead of void * for generic functions to
avoid gcc 3.4 compiler warnings. Remove the unused/obsolete GLX_render_texture stuff.
Diffstat (limited to 'src/mesa/drivers/x11/glxapi.c')
-rw-r--r--src/mesa/drivers/x11/glxapi.c462
1 files changed, 249 insertions, 213 deletions
diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c
index 4680994310..ae221d1f30 100644
--- a/src/mesa/drivers/x11/glxapi.c
+++ b/src/mesa/drivers/x11/glxapi.c
@@ -1,9 +1,8 @@
-
/*
* Mesa 3-D graphics library
- * Version: 5.1
+ * Version: 6.3
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -35,6 +34,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include "glheader.h"
#include "glapi.h"
#include "glxapi.h"
@@ -158,7 +158,8 @@ static GLXContext CurrentContext = 0;
/*** GLX_VERSION_1_0 ***/
-XVisualInfo *glXChooseVisual(Display *dpy, int screen, int *list)
+XVisualInfo PUBLIC *
+glXChooseVisual(Display *dpy, int screen, int *list)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -168,7 +169,8 @@ XVisualInfo *glXChooseVisual(Display *dpy, int screen, int *list)
}
-void glXCopyContext(Display *dpy, GLXContext src, GLXContext dst, unsigned long mask)
+void PUBLIC
+glXCopyContext(Display *dpy, GLXContext src, GLXContext dst, unsigned long mask)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -178,7 +180,8 @@ void glXCopyContext(Display *dpy, GLXContext src, GLXContext dst, unsigned long
}
-GLXContext glXCreateContext(Display *dpy, XVisualInfo *visinfo, GLXContext shareList, Bool direct)
+GLXContext PUBLIC
+glXCreateContext(Display *dpy, XVisualInfo *visinfo, GLXContext shareList, Bool direct)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -188,7 +191,8 @@ GLXContext glXCreateContext(Display *dpy, XVisualInfo *visinfo, GLXContext share
}
-GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *visinfo, Pixmap pixmap)
+GLXPixmap PUBLIC
+glXCreateGLXPixmap(Display *dpy, XVisualInfo *visinfo, Pixmap pixmap)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -198,7 +202,8 @@ GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *visinfo, Pixmap pixmap)
}
-void glXDestroyContext(Display *dpy, GLXContext ctx)
+void PUBLIC
+glXDestroyContext(Display *dpy, GLXContext ctx)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -208,7 +213,8 @@ void glXDestroyContext(Display *dpy, GLXContext ctx)
}
-void glXDestroyGLXPixmap(Display *dpy, GLXPixmap pixmap)
+void PUBLIC
+glXDestroyGLXPixmap(Display *dpy, GLXPixmap pixmap)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -218,7 +224,8 @@ void glXDestroyGLXPixmap(Display *dpy, GLXPixmap pixmap)
}
-int glXGetConfig(Display *dpy, XVisualInfo *visinfo, int attrib, int *value)
+int PUBLIC
+glXGetConfig(Display *dpy, XVisualInfo *visinfo, int attrib, int *value)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -232,7 +239,8 @@ int glXGetConfig(Display *dpy, XVisualInfo *visinfo, int attrib, int *value)
/* Use real libGL's glXGetCurrentContext() function */
#else
/* stand-alone Mesa */
-GLXContext glXGetCurrentContext(void)
+GLXContext PUBLIC
+glXGetCurrentContext(void)
{
return CurrentContext;
}
@@ -243,7 +251,8 @@ GLXContext glXGetCurrentContext(void)
/* Use real libGL's glXGetCurrentContext() function */
#else
/* stand-alone Mesa */
-GLXDrawable glXGetCurrentDrawable(void)
+GLXDrawable PUBLIC
+glXGetCurrentDrawable(void)
{
__GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext();
return gc ? gc->currentDrawable : 0;
@@ -251,7 +260,8 @@ GLXDrawable glXGetCurrentDrawable(void)
#endif
-Bool glXIsDirect(Display *dpy, GLXContext ctx)
+Bool PUBLIC
+glXIsDirect(Display *dpy, GLXContext ctx)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -261,7 +271,8 @@ Bool glXIsDirect(Display *dpy, GLXContext ctx)
}
-Bool glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx)
+Bool PUBLIC
+glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx)
{
Bool b;
struct _glxapi_table *t;
@@ -279,7 +290,8 @@ Bool glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx)
}
-Bool glXQueryExtension(Display *dpy, int *errorb, int *event)
+Bool PUBLIC
+glXQueryExtension(Display *dpy, int *errorb, int *event)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -289,7 +301,8 @@ Bool glXQueryExtension(Display *dpy, int *errorb, int *event)
}
-Bool glXQueryVersion(Display *dpy, int *maj, int *min)
+Bool PUBLIC
+glXQueryVersion(Display *dpy, int *maj, int *min)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -299,7 +312,8 @@ Bool glXQueryVersion(Display *dpy, int *maj, int *min)
}
-void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
+void PUBLIC
+glXSwapBuffers(Display *dpy, GLXDrawable drawable)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -309,7 +323,8 @@ void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
}
-void glXUseXFont(Font font, int first, int count, int listBase)
+void PUBLIC
+glXUseXFont(Font font, int first, int count, int listBase)
{
struct _glxapi_table *t;
Display *dpy = glXGetCurrentDisplay();
@@ -320,7 +335,8 @@ void glXUseXFont(Font font, int first, int count, int listBase)
}
-void glXWaitGL(void)
+void PUBLIC
+glXWaitGL(void)
{
struct _glxapi_table *t;
Display *dpy = glXGetCurrentDisplay();
@@ -331,7 +347,8 @@ void glXWaitGL(void)
}
-void glXWaitX(void)
+void PUBLIC
+glXWaitX(void)
{
struct _glxapi_table *t;
Display *dpy = glXGetCurrentDisplay();
@@ -345,7 +362,8 @@ void glXWaitX(void)
/*** GLX_VERSION_1_1 ***/
-const char *glXGetClientString(Display *dpy, int name)
+const char PUBLIC *
+glXGetClientString(Display *dpy, int name)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -355,7 +373,8 @@ const char *glXGetClientString(Display *dpy, int name)
}
-const char *glXQueryExtensionsString(Display *dpy, int screen)
+const char PUBLIC *
+glXQueryExtensionsString(Display *dpy, int screen)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -365,7 +384,8 @@ const char *glXQueryExtensionsString(Display *dpy, int screen)
}
-const char *glXQueryServerString(Display *dpy, int screen, int name)
+const char PUBLIC *
+glXQueryServerString(Display *dpy, int screen, int name)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -378,7 +398,8 @@ const char *glXQueryServerString(Display *dpy, int screen, int name)
/*** GLX_VERSION_1_2 ***/
#if !defined(GLX_BUILT_IN_XMESA)
-Display *glXGetCurrentDisplay(void)
+Display PUBLIC *
+glXGetCurrentDisplay(void)
{
/* Same code as in libGL's glxext.c */
__GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext();
@@ -391,7 +412,8 @@ Display *glXGetCurrentDisplay(void)
/*** GLX_VERSION_1_3 ***/
-GLXFBConfig *glXChooseFBConfig(Display *dpy, int screen, const int *attribList, int *nitems)
+GLXFBConfig PUBLIC *
+glXChooseFBConfig(Display *dpy, int screen, const int *attribList, int *nitems)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -401,7 +423,8 @@ GLXFBConfig *glXChooseFBConfig(Display *dpy, int screen, const int *attribList,
}
-GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct)
+GLXContext PUBLIC
+glXCreateNewContext(Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -411,7 +434,8 @@ GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config, int renderType,
}
-GLXPbuffer glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attribList)
+GLXPbuffer PUBLIC
+glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attribList)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -421,7 +445,8 @@ GLXPbuffer glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attribL
}
-GLXPixmap glXCreatePixmap(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attribList)
+GLXPixmap PUBLIC
+glXCreatePixmap(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attribList)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -431,7 +456,8 @@ GLXPixmap glXCreatePixmap(Display *dpy, GLXFBConfig config, Pixmap pixmap, const
}
-GLXWindow glXCreateWindow(Display *dpy, GLXFBConfig config, Window win, const int *attribList)
+GLXWindow PUBLIC
+glXCreateWindow(Display *dpy, GLXFBConfig config, Window win, const int *attribList)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -441,7 +467,8 @@ GLXWindow glXCreateWindow(Display *dpy, GLXFBConfig config, Window win, const in
}
-void glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf)
+void PUBLIC
+glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -451,7 +478,8 @@ void glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf)
}
-void glXDestroyPixmap(Display *dpy, GLXPixmap pixmap)
+void PUBLIC
+glXDestroyPixmap(Display *dpy, GLXPixmap pixmap)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -461,7 +489,8 @@ void glXDestroyPixmap(Display *dpy, GLXPixmap pixmap)
}
-void glXDestroyWindow(Display *dpy, GLXWindow window)
+void PUBLIC
+glXDestroyWindow(Display *dpy, GLXWindow window)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -474,7 +503,8 @@ void glXDestroyWindow(Display *dpy, GLXWindow window)
#ifdef GLX_BUILT_IN_XMESA
/* Use the glXGetCurrentReadDrawable() function from libGL */
#else
-GLXDrawable glXGetCurrentReadDrawable(void)
+GLXDrawable PUBLIC
+glXGetCurrentReadDrawable(void)
{
__GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext();
return gc ? gc->currentReadable : 0;
@@ -482,7 +512,8 @@ GLXDrawable glXGetCurrentReadDrawable(void)
#endif
-int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)
+int PUBLIC
+glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -492,7 +523,8 @@ int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *v
}
-GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements)
+GLXFBConfig PUBLIC *
+glXGetFBConfigs(Display *dpy, int screen, int *nelements)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -501,7 +533,8 @@ GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements)
return (t->GetFBConfigs)(dpy, screen, nelements);
}
-void glXGetSelectedEvent(Display *dpy, GLXDrawable drawable, unsigned long *mask)
+void PUBLIC
+glXGetSelectedEvent(Display *dpy, GLXDrawable drawable, unsigned long *mask)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -511,7 +544,8 @@ void glXGetSelectedEvent(Display *dpy, GLXDrawable drawable, unsigned long *mask
}
-XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config)
+XVisualInfo PUBLIC *
+glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -521,7 +555,8 @@ XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config)
}
-Bool glXMakeContextCurrent(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
+Bool PUBLIC
+glXMakeContextCurrent(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
{
Bool b;
struct _glxapi_table *t;
@@ -538,7 +573,8 @@ Bool glXMakeContextCurrent(Display *dpy, GLXDrawable draw, GLXDrawable read, GLX
}
-int glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value)
+int PUBLIC
+glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -549,7 +585,8 @@ int glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value)
}
-void glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value)
+void PUBLIC
+glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -559,7 +596,8 @@ void glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute, unsigned in
}
-void glXSelectEvent(Display *dpy, GLXDrawable drawable, unsigned long mask)
+void PUBLIC
+glXSelectEvent(Display *dpy, GLXDrawable drawable, unsigned long mask)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -572,7 +610,8 @@ void glXSelectEvent(Display *dpy, GLXDrawable drawable, unsigned long mask)
/*** GLX_SGI_swap_control ***/
-int glXSwapIntervalSGI(int interval)
+int PUBLIC
+glXSwapIntervalSGI(int interval)
{
struct _glxapi_table *t;
Display *dpy = glXGetCurrentDisplay();
@@ -586,7 +625,8 @@ int glXSwapIntervalSGI(int interval)
/*** GLX_SGI_video_sync ***/
-int glXGetVideoSyncSGI(unsigned int *count)
+int PUBLIC
+glXGetVideoSyncSGI(unsigned int *count)
{
struct _glxapi_table *t;
Display *dpy = glXGetCurrentDisplay();
@@ -596,7 +636,8 @@ int glXGetVideoSyncSGI(unsigned int *count)
return (t->GetVideoSyncSGI)(count);
}
-int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
+int PUBLIC
+glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
{
struct _glxapi_table *t;
Display *dpy = glXGetCurrentDisplay();
@@ -610,7 +651,8 @@ int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
/*** GLX_SGI_make_current_read ***/
-Bool glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
+Bool PUBLIC
+glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -623,7 +665,8 @@ Bool glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLX
/* Use glXGetCurrentReadDrawableSGI() from libGL */
#else
/* stand-alone Mesa */
-GLXDrawable glXGetCurrentReadDrawableSGI(void)
+GLXDrawable PUBLIC
+glXGetCurrentReadDrawableSGI(void)
{
return glXGetCurrentReadDrawable();
}
@@ -632,7 +675,8 @@ GLXDrawable glXGetCurrentReadDrawableSGI(void)
#if defined(_VL_H)
-GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode)
+GLXVideoSourceSGIX PUBLIC
+glXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -641,7 +685,8 @@ GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServe
return (t->CreateGLXVideoSourceSGIX)(dpy, screen, server, path, nodeClass, drainNode);
}
-void glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src)
+void PUBLIC
+glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -655,7 +700,8 @@ void glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src)
/*** GLX_EXT_import_context ***/
-void glXFreeContextEXT(Display *dpy, GLXContext context)
+void PUBLIC
+glXFreeContextEXT(Display *dpy, GLXContext context)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -668,7 +714,8 @@ void glXFreeContextEXT(Display *dpy, GLXContext context)
/* Use real libGL's glXGetContextIDEXT() function */
#else
/* stand-alone Mesa */
-GLXContextID glXGetContextIDEXT(const GLXContext context)
+GLXContextID PUBLIC
+glXGetContextIDEXT(const GLXContext context)
{
return ((__GLXcontext *) context)->xid;
}
@@ -678,13 +725,15 @@ GLXContextID glXGetContextIDEXT(const GLXContext context)
/* Use real libGL's glXGetCurrentDisplayEXT() function */
#else
/* stand-alone Mesa */
-Display *glXGetCurrentDisplayEXT(void)
+Display PUBLIC *
+glXGetCurrentDisplayEXT(void)
{
return glXGetCurrentDisplay();
}
#endif
-GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID)
+GLXContext PUBLIC
+glXImportContextEXT(Display *dpy, GLXContextID contextID)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -693,7 +742,8 @@ GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID)
return (t->ImportContextEXT)(dpy, contextID);
}
-int glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute,int *value)
+int PUBLIC
+glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute,int *value)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -706,7 +756,8 @@ int glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute,int *
/*** GLX_SGIX_fbconfig ***/
-int glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value)
+int PUBLIC
+glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -715,7 +766,8 @@ int glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute
return (t->GetFBConfigAttribSGIX)(dpy, config, attribute, value);
}
-GLXFBConfigSGIX *glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list, int *nelements)
+GLXFBConfigSGIX PUBLIC *
+glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list, int *nelements)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -724,7 +776,8 @@ GLXFBConfigSGIX *glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_lis
return (t->ChooseFBConfigSGIX)(dpy, screen, attrib_list, nelements);
}
-GLXPixmap glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap)
+GLXPixmap PUBLIC
+glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -733,7 +786,8 @@ GLXPixmap glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config,
return (t->CreateGLXPixmapWithConfigSGIX)(dpy, config, pixmap);
}
-GLXContext glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct)
+GLXContext PUBLIC
+glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -742,7 +796,8 @@ GLXContext glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config,
return (t->CreateContextWithConfigSGIX)(dpy, config, render_type, share_list, direct);
}
-XVisualInfo * glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config)
+XVisualInfo PUBLIC *
+glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -751,7 +806,8 @@ XVisualInfo * glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config)
return (t->GetVisualFromFBConfigSGIX)(dpy, config);
}
-GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis)
+GLXFBConfigSGIX PUBLIC
+glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -764,7 +820,8 @@ GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis)
/*** GLX_SGIX_pbuffer ***/
-GLXPbufferSGIX glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list)
+GLXPbufferSGIX PUBLIC
+glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -773,7 +830,8 @@ GLXPbufferSGIX glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, uns
return (t->CreateGLXPbufferSGIX)(dpy, config, width, height, attrib_list);
}
-void glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf)
+void PUBLIC
+glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -782,7 +840,8 @@ void glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf)
(t->DestroyGLXPbufferSGIX)(dpy, pbuf);
}
-int glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value)
+int PUBLIC
+glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -791,7 +850,8 @@ int glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, uns
return (t->QueryGLXPbufferSGIX)(dpy, pbuf, attribute, value);
}
-void glXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask)
+void PUBLIC
+glXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -800,7 +860,8 @@ void glXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask)
(t->SelectEventSGIX)(dpy, drawable, mask);
}
-void glXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long *mask)
+void PUBLIC
+glXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long *mask)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -813,7 +874,8 @@ void glXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long *
/*** GLX_SGI_cushion ***/
-void glXCushionSGI(Display *dpy, Window win, float cushion)
+void PUBLIC
+glXCushionSGI(Display *dpy, Window win, float cushion)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -826,7 +888,8 @@ void glXCushionSGI(Display *dpy, Window win, float cushion)
/*** GLX_SGIX_video_resize ***/
-int glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window)
+int PUBLIC
+glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -835,7 +898,8 @@ int glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window wi
return (t->BindChannelToWindowSGIX)(dpy, screen, channel, window);
}
-int glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h)
+int PUBLIC
+glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -844,7 +908,8 @@ int glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int
return (t->ChannelRectSGIX)(dpy, screen, channel, x, y, w, h);
}
-int glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h)
+int PUBLIC
+glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -853,7 +918,8 @@ int glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *
return (t->QueryChannelRectSGIX)(dpy, screen, channel, x, y, w, h);
}
-int glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh)
+int PUBLIC
+glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -862,7 +928,8 @@ int glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, in
return (t->QueryChannelDeltasSGIX)(dpy, screen, channel, dx, dy, dw, dh);
}
-int glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype)
+int PUBLIC
+glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -875,7 +942,8 @@ int glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctyp
#if defined(_DM_BUFFER_H_)
-Bool glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer)
+Bool PUBLIC
+glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -889,7 +957,8 @@ Bool glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *p
/*** GLX_SGIX_swap_group ***/
-void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, GLXDrawable member)
+void PUBLIC
+glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, GLXDrawable member)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -901,7 +970,8 @@ void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, GLXDrawable member
/*** GLX_SGIX_swap_barrier ***/
-void glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, int barrier)
+void PUBLIC
+glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, int barrier)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -910,7 +980,8 @@ void glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, int barrier)
(*t->BindSwapBarrierSGIX)(dpy, drawable, barrier);
}
-Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max)
+Bool PUBLIC
+glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -923,7 +994,8 @@ Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max)
/*** GLX_SUN_get_transparent_index ***/
-Status glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, long *pTransparent)
+Status PUBLIC
+glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, long *pTransparent)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -936,7 +1008,8 @@ Status glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay,
/*** GLX_MESA_copy_sub_buffer ***/
-void glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable, int x, int y, int width, int height)
+void PUBLIC
+glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable, int x, int y, int width, int height)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -949,7 +1022,8 @@ void glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable, int x, int y, int
/*** GLX_MESA_release_buffers ***/
-Bool glXReleaseBuffersMESA(Display *dpy, Window w)
+Bool PUBLIC
+glXReleaseBuffersMESA(Display *dpy, Window w)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -962,7 +1036,8 @@ Bool glXReleaseBuffersMESA(Display *dpy, Window w)
/*** GLX_MESA_pixmap_colormap ***/
-GLXPixmap glXCreateGLXPixmapMESA(Display *dpy, XVisualInfo *visinfo, Pixmap pixmap, Colormap cmap)
+GLXPixmap PUBLIC
+glXCreateGLXPixmapMESA(Display *dpy, XVisualInfo *visinfo, Pixmap pixmap, Colormap cmap)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
@@ -975,7 +1050,8 @@ GLXPixmap glXCreateGLXPixmapMESA(Display *dpy, XVisualInfo *visinfo, Pixmap pixm
/*** GLX_MESA_set_3dfx_mode ***/
-Bool glXSet3DfxModeMESA(int mode)
+Bool PUBLIC
+glXSet3DfxModeMESA(int mode)
{
struct _glxapi_table *t;
Display *dpy = glXGetCurrentDisplay();
@@ -989,7 +1065,7 @@ Bool glXSet3DfxModeMESA(int mode)
/*** GLX_NV_vertex_array_range ***/
-void *
+void PUBLIC *
glXAllocateMemoryNV( GLsizei size,
GLfloat readFrequency,
GLfloat writeFrequency,
@@ -1004,7 +1080,7 @@ glXAllocateMemoryNV( GLsizei size,
}
-void
+void PUBLIC
glXFreeMemoryNV( GLvoid *pointer )
{
struct _glxapi_table *t;
@@ -1018,7 +1094,7 @@ glXFreeMemoryNV( GLvoid *pointer )
/*** GLX_MESA_agp_offset */
-GLuint
+GLuint PUBLIC
glXGetAGPOffsetMESA( const GLvoid *pointer )
{
struct _glxapi_table *t;
@@ -1030,42 +1106,6 @@ glXGetAGPOffsetMESA( const GLvoid *pointer )
}
-/*** GLX_ARB_render_Texture ***/
-
-Bool
-glXBindTexImageARB( Display *dpy, GLXPbuffer pbuffer, int buffer )
-{
- struct _glxapi_table *t;
- GET_DISPATCH(dpy, t);
- if (!t)
- return False;
- return (t->BindTexImageARB)(dpy, pbuffer, buffer);
-}
-
-
-Bool
-glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer )
-{
- struct _glxapi_table *t;
- GET_DISPATCH(dpy, t);
- if (!t)
- return False;
- return (t->ReleaseTexImageARB)(dpy, pbuffer, buffer);
-}
-
-
-Bool
-glXDrawableAttribARB( Display *dpy, GLXDrawable draw, const int *attribList )
-{
- struct _glxapi_table *t;
- GET_DISPATCH(dpy, t);
- if (!t)
- return False;
- return (t->DrawableAttribARB)(dpy, draw, attribList);
-}
-
-
-
/**********************************************************************/
/* GLX API management functions */
/**********************************************************************/
@@ -1141,160 +1181,156 @@ generic_no_op_func(void)
void
_glxapi_set_no_op_table(struct _glxapi_table *t)
{
+ typedef int (*nop_func)(void);
+ nop_func *dispatch = (nop_func *) t;
GLuint n = _glxapi_get_dispatch_table_size();
GLuint i;
- void **dispatch = (void **) t;
for (i = 0; i < n; i++) {
- dispatch[i] = (void *) generic_no_op_func;
+ dispatch[i] = generic_no_op_func;
}
}
struct name_address_pair {
const char *Name;
- GLvoid *Address;
+ __GLXextFuncPtr Address;
};
static struct name_address_pair GLX_functions[] = {
/*** GLX_VERSION_1_0 ***/
- { "glXChooseVisual", (GLvoid *) glXChooseVisual },
- { "glXCopyContext", (GLvoid *) glXCopyContext },
- { "glXCreateContext", (GLvoid *) glXCreateContext },
- { "glXCreateGLXPixmap", (GLvoid *) glXCreateGLXPixmap },
- { "glXDestroyContext", (GLvoid *) glXDestroyContext },
- { "glXDestroyGLXPixmap", (GLvoid *) glXDestroyGLXPixmap },
- { "glXGetConfig", (GLvoid *) glXGetConfig },
- { "glXGetCurrentContext", (GLvoid *) glXGetCurrentContext },
- { "glXGetCurrentDrawable", (GLvoid *) glXGetCurrentDrawable },
- { "glXIsDirect", (GLvoid *) glXIsDirect },
- { "glXMakeCurrent", (GLvoid *) glXMakeCurrent },
- { "glXQueryExtension", (GLvoid *) glXQueryExtension },
- { "glXQueryVersion", (GLvoid *) glXQueryVersion },
- { "glXSwapBuffers", (GLvoid *) glXSwapBuffers },
- { "glXUseXFont", (GLvoid *) glXUseXFont },
- { "glXWaitGL", (GLvoid *) glXWaitGL },
- { "glXWaitX", (GLvoid *) glXWaitX },
+ { "glXChooseVisual", (__GLXextFuncPtr) glXChooseVisual },
+ { "glXCopyContext", (__GLXextFuncPtr) glXCopyContext },
+ { "glXCreateContext", (__GLXextFuncPtr) glXCreateContext },
+ { "glXCreateGLXPixmap", (__GLXextFuncPtr) glXCreateGLXPixmap },
+ { "glXDestroyContext", (__GLXextFuncPtr) glXDestroyContext },
+ { "glXDestroyGLXPixmap", (__GLXextFuncPtr) glXDestroyGLXPixmap },
+ { "glXGetConfig", (__GLXextFuncPtr) glXGetConfig },
+ { "glXGetCurrentContext", (__GLXextFuncPtr) glXGetCurrentContext },
+ { "glXGetCurrentDrawable", (__GLXextFuncPtr) glXGetCurrentDrawable },
+ { "glXIsDirect", (__GLXextFuncPtr) glXIsDirect },
+ { "glXMakeCurrent", (__GLXextFuncPtr) glXMakeCurrent },
+ { "glXQueryExtension", (__GLXextFuncPtr) glXQueryExtension },
+ { "glXQueryVersion", (__GLXextFuncPtr) glXQueryVersion },
+ { "glXSwapBuffers", (__GLXextFuncPtr) glXSwapBuffers },
+ { "glXUseXFont", (__GLXextFuncPtr) glXUseXFont },
+ { "glXWaitGL", (__GLXextFuncPtr) glXWaitGL },
+ { "glXWaitX", (__GLXextFuncPtr) glXWaitX },
/*** GLX_VERSION_1_1 ***/
- { "glXGetClientString", (GLvoid *) glXGetClientString },
- { "glXQueryExtensionsString", (GLvoid *) glXQueryExtensionsString },
- { "glXQueryServerString", (GLvoid *) glXQueryServerString },
+ { "glXGetClientString", (__GLXextFuncPtr) glXGetClientString },
+ { "glXQueryExtensionsString", (__GLXextFuncPtr) glXQueryExtensionsString },
+ { "glXQueryServerString", (__GLXextFuncPtr) glXQueryServerString },
/*** GLX_VERSION_1_2 ***/
- { "glXGetCurrentDisplay", (GLvoid *) glXGetCurrentDisplay },
+ { "glXGetCurrentDisplay", (__GLXextFuncPtr) glXGetCurrentDisplay },
/*** GLX_VERSION_1_3 ***/
- { "glXChooseFBConfig", (GLvoid *) glXChooseFBConfig },
- { "glXCreateNewContext", (GLvoid *) glXCreateNewContext },
- { "glXCreatePbuffer", (GLvoid *) glXCreatePbuffer },
- { "glXCreatePixmap", (GLvoid *) glXCreatePixmap },
- { "glXCreateWindow", (GLvoid *) glXCreateWindow },
- { "glXDestroyPbuffer", (GLvoid *) glXDestroyPbuffer },
- { "glXDestroyPixmap", (GLvoid *) glXDestroyPixmap },
- { "glXDestroyWindow", (GLvoid *) glXDestroyWindow },
- { "glXGetCurrentReadDrawable", (GLvoid *) glXGetCurrentReadDrawable },
- { "glXGetFBConfigAttrib", (GLvoid *) glXGetFBConfigAttrib },
- { "glXGetFBConfigs", (GLvoid *) glXGetFBConfigs },
- { "glXGetSelectedEvent", (GLvoid *) glXGetSelectedEvent },
- { "glXGetVisualFromFBConfig", (GLvoid *) glXGetVisualFromFBConfig },
- { "glXMakeContextCurrent", (GLvoid *) glXMakeContextCurrent },
- { "glXQueryContext", (GLvoid *) glXQueryContext },
- { "glXQueryDrawable", (GLvoid *) glXQueryDrawable },
- { "glXSelectEvent", (GLvoid *) glXSelectEvent },
+ { "glXChooseFBConfig", (__GLXextFuncPtr) glXChooseFBConfig },
+ { "glXCreateNewContext", (__GLXextFuncPtr) glXCreateNewContext },
+ { "glXCreatePbuffer", (__GLXextFuncPtr) glXCreatePbuffer },
+ { "glXCreatePixmap", (__GLXextFuncPtr) glXCreatePixmap },
+ { "glXCreateWindow", (__GLXextFuncPtr) glXCreateWindow },
+ { "glXDestroyPbuffer", (__GLXextFuncPtr) glXDestroyPbuffer },
+ { "glXDestroyPixmap", (__GLXextFuncPtr) glXDestroyPixmap },
+ { "glXDestroyWindow", (__GLXextFuncPtr) glXDestroyWindow },
+ { "glXGetCurrentReadDrawable", (__GLXextFuncPtr) glXGetCurrentReadDrawable },
+ { "glXGetFBConfigAttrib", (__GLXextFuncPtr) glXGetFBConfigAttrib },
+ { "glXGetFBConfigs", (__GLXextFuncPtr) glXGetFBConfigs },
+ { "glXGetSelectedEvent", (__GLXextFuncPtr) glXGetSelectedEvent },
+ { "glXGetVisualFromFBConfig", (__GLXextFuncPtr) glXGetVisualFromFBConfig },
+ { "glXMakeContextCurrent", (__GLXextFuncPtr) glXMakeContextCurrent },
+ { "glXQueryContext", (__GLXextFuncPtr) glXQueryContext },
+ { "glXQueryDrawable", (__GLXextFuncPtr) glXQueryDrawable },
+ { "glXSelectEvent", (__GLXextFuncPtr) glXSelectEvent },
/*** GLX_VERSION_1_4 ***/
- { "glXGetProcAddress", (GLvoid *) glXGetProcAddress },
+ { "glXGetProcAddress", (__GLXextFuncPtr) glXGetProcAddress },
/*** GLX_SGI_swap_control ***/
- { "glXSwapIntervalSGI", (GLvoid *) glXSwapIntervalSGI },
+ { "glXSwapIntervalSGI", (__GLXextFuncPtr) glXSwapIntervalSGI },
/*** GLX_SGI_video_sync ***/
- { "glXGetVideoSyncSGI", (GLvoid *) glXGetVideoSyncSGI },
- { "glXWaitVideoSyncSGI", (GLvoid *) glXWaitVideoSyncSGI },
+ { "glXGetVideoSyncSGI", (__GLXextFuncPtr) glXGetVideoSyncSGI },
+ { "glXWaitVideoSyncSGI", (__GLXextFuncPtr) glXWaitVideoSyncSGI },
/*** GLX_SGI_make_current_read ***/
- { "glXMakeCurrentReadSGI", (GLvoid *) glXMakeCurrentReadSGI },
- { "glXGetCurrentReadDrawableSGI", (GLvoid *) glXGetCurrentReadDrawableSGI },
+ { "glXMakeCurrentReadSGI", (__GLXextFuncPtr) glXMakeCurrentReadSGI },
+ { "glXGetCurrentReadDrawableSGI", (__GLXextFuncPtr) glXGetCurrentReadDrawableSGI },
/*** GLX_SGIX_video_source ***/
#if defined(_VL_H)
- { "glXCreateGLXVideoSourceSGIX", (GLvoid *) glXCreateGLXVideoSourceSGIX },
- { "glXDestroyGLXVideoSourceSGIX", (GLvoid *) glXDestroyGLXVideoSourceSGIX },
+ { "glXCreateGLXVideoSourceSGIX", (__GLXextFuncPtr) glXCreateGLXVideoSourceSGIX },
+ { "glXDestroyGLXVideoSourceSGIX", (__GLXextFuncPtr) glXDestroyGLXVideoSourceSGIX },
#endif
/*** GLX_EXT_import_context ***/
- { "glXFreeContextEXT", (GLvoid *) glXFreeContextEXT },
- { "glXGetContextIDEXT", (GLvoid *) glXGetContextIDEXT },
- { "glXGetCurrentDisplayEXT", (GLvoid *) glXGetCurrentDisplayEXT },
- { "glXImportContextEXT", (GLvoid *) glXImportContextEXT },
- { "glXQueryContextInfoEXT", (GLvoid *) glXQueryContextInfoEXT },
+ { "glXFreeContextEXT", (__GLXextFuncPtr) glXFreeContextEXT },
+ { "glXGetContextIDEXT", (__GLXextFuncPtr) glXGetContextIDEXT },
+ { "glXGetCurrentDisplayEXT", (__GLXextFuncPtr) glXGetCurrentDisplayEXT },
+ { "glXImportContextEXT", (__GLXextFuncPtr) glXImportContextEXT },
+ { "glXQueryContextInfoEXT", (__GLXextFuncPtr) glXQueryContextInfoEXT },
/*** GLX_SGIX_fbconfig ***/
- { "glXGetFBConfigAttribSGIX", (GLvoid *) glXGetFBConfigAttribSGIX },
- { "glXChooseFBConfigSGIX", (GLvoid *) glXChooseFBConfigSGIX },
- { "glXCreateGLXPixmapWithConfigSGIX", (GLvoid *) glXCreateGLXPixmapWithConfigSGIX },
- { "glXCreateContextWithConfigSGIX", (GLvoid *) glXCreateContextWithConfigSGIX },
- { "glXGetVisualFromFBConfigSGIX", (GLvoid *) glXGetVisualFromFBConfigSGIX },
- { "glXGetFBConfigFromVisualSGIX", (GLvoid *) glXGetFBConfigFromVisualSGIX },
+ { "glXGetFBConfigAttribSGIX", (__GLXextFuncPtr) glXGetFBConfigAttribSGIX },
+ { "glXChooseFBConfigSGIX", (__GLXextFuncPtr) glXChooseFBConfigSGIX },
+ { "glXCreateGLXPixmapWithConfigSGIX", (__GLXextFuncPtr) glXCreateGLXPixmapWithConfigSGIX },
+ { "glXCreateContextWithConfigSGIX", (__GLXextFuncPtr) glXCreateContextWithConfigSGIX },
+ { "glXGetVisualFromFBConfigSGIX", (__GLXextFuncPtr) glXGetVisualFromFBConfigSGIX },
+ { "glXGetFBConfigFromVisualSGIX", (__GLXextFuncPtr) glXGetFBConfigFromVisualSGIX },
/*** GLX_SGIX_pbuffer ***/
- { "glXCreateGLXPbufferSGIX", (GLvoid *) glXCreateGLXPbufferSGIX },
- { "glXDestroyGLXPbufferSGIX", (GLvoid *) glXDestroyGLXPbufferSGIX },
- { "glXQueryGLXPbufferSGIX", (GLvoid *) glXQueryGLXPbufferSGIX },
- { "glXSelectEventSGIX", (GLvoid *) glXSelectEventSGIX },
- { "glXGetSelectedEventSGIX", (GLvoid *) glXGetSelectedEventSGIX },
+ { "glXCreateGLXPbufferSGIX", (__GLXextFuncPtr) glXCreateGLXPbufferSGIX },
+ { "glXDestroyGLXPbufferSGIX", (__GLXextFuncPtr) glXDestroyGLXPbufferSGIX },
+ { "glXQueryGLXPbufferSGIX", (__GLXextFuncPtr) glXQueryGLXPbufferSGIX },
+ { "glXSelectEventSGIX", (__GLXextFuncPtr) glXSelectEventSGIX },
+ { "glXGetSelectedEventSGIX", (__GLXextFuncPtr) glXGetSelectedEventSGIX },
/*** GLX_SGI_cushion ***/
- { "glXCushionSGI", (GLvoid *) glXCushionSGI },
+ { "glXCushionSGI", (__GLXextFuncPtr) glXCushionSGI },
/*** GLX_SGIX_video_resize ***/
- { "glXBindChannelToWindowSGIX", (GLvoid *) glXBindChannelToWindowSGIX },
- { "glXChannelRectSGIX", (GLvoid *) glXChannelRectSGIX },
- { "glXQueryChannelRectSGIX", (GLvoid *) glXQueryChannelRectSGIX },
- { "glXQueryChannelDeltasSGIX", (GLvoid *) glXQueryChannelDeltasSGIX },
- { "glXChannelRectSyncSGIX", (GLvoid *) glXChannelRectSyncSGIX },
+ { "glXBindChannelToWindowSGIX", (__GLXextFuncPtr) glXBindChannelToWindowSGIX },
+ { "glXChannelRectSGIX", (__GLXextFuncPtr) glXChannelRectSGIX },
+ { "glXQueryChannelRectSGIX", (__GLXextFuncPtr) glXQueryChannelRectSGIX },
+ { "glXQueryChannelDeltasSGIX", (__GLXextFuncPtr) glXQueryChannelDeltasSGIX },
+ { "glXChannelRectSyncSGIX", (__GLXextFuncPtr) glXChannelRectSyncSGIX },
/*** GLX_SGIX_dmbuffer **/
#if defined(_DM_BUFFER_H_)
- { "glXAssociateDMPbufferSGIX", (GLvoid *) glXAssociateDMPbufferSGIX },
+ { "glXAssociateDMPbufferSGIX", (__GLXextFuncPtr) glXAssociateDMPbufferSGIX },
#endif
/*** GLX_SGIX_swap_group ***/
- { "glXJoinSwapGroupSGIX", (GLvoid *) glXJoinSwapGroupSGIX },
+ { "glXJoinSwapGroupSGIX", (__GLXextFuncPtr) glXJoinSwapGroupSGIX },
/*** GLX_SGIX_swap_barrier ***/
- { "glXBindSwapBarrierSGIX", (GLvoid *) glXBindSwapBarrierSGIX },
- { "glXQueryMaxSwapBarriersSGIX", (GLvoid *) glXQueryMaxSwapBarriersSGIX },
+ { "glXBindSwapBarrierSGIX", (__GLXextFuncPtr) glXBindSwapBarrierSGIX },
+ { "glXQueryMaxSwapBarriersSGIX", (__GLXextFuncPtr) glXQueryMaxSwapBarriersSGIX },
/*** GLX_SUN_get_transparent_index ***/
- { "glXGetTransparentIndexSUN", (GLvoid *) glXGetTransparentIndexSUN },
+ { "glXGetTransparentIndexSUN", (__GLXextFuncPtr) glXGetTransparentIndexSUN },
/*** GLX_MESA_copy_sub_buffer ***/
- { "glXCopySubBufferMESA", (GLvoid *) glXCopySubBufferMESA },
+ { "glXCopySubBufferMESA", (__GLXextFuncPtr) glXCopySubBufferMESA },
/*** GLX_MESA_pixmap_colormap ***/
- { "glXCreateGLXPixmapMESA", (GLvoid *) glXCreateGLXPixmapMESA },
+ { "glXCreateGLXPixmapMESA", (__GLXextFuncPtr) glXCreateGLXPixmapMESA },
/*** GLX_MESA_release_buffers ***/
- { "glXReleaseBuffersMESA", (GLvoid *) glXReleaseBuffersMESA },
+ { "glXReleaseBuffersMESA", (__GLXextFuncPtr) glXReleaseBuffersMESA },
/*** GLX_MESA_set_3dfx_mode ***/
- { "glXSet3DfxModeMESA", (GLvoid *) glXSet3DfxModeMESA },
+ { "glXSet3DfxModeMESA", (__GLXextFuncPtr) glXSet3DfxModeMESA },
/*** GLX_ARB_get_proc_address ***/
- { "glXGetProcAddressARB", (GLvoid *) glXGetProcAddressARB },
+ { "glXGetProcAddressARB", (__GLXextFuncPtr) glXGetProcAddressARB },
/*** GLX_NV_vertex_array_range ***/
- { "glXAllocateMemoryNV", (GLvoid *) glXAllocateMemoryNV },
- { "glXFreeMemoryNV", (GLvoid *) glXFreeMemoryNV },
+ { "glXAllocateMemoryNV", (__GLXextFuncPtr) glXAllocateMemoryNV },
+ { "glXFreeMemoryNV", (__GLXextFuncPtr) glXFreeMemoryNV },
/*** GLX_MESA_agp_offset ***/
- { "glXGetAGPOffsetMESA", (GLvoid *) glXGetAGPOffsetMESA },
-
- /*** GLX_ARB_render_texture ***/
- { "glXBindTexImageARB", (GLvoid *) glXBindTexImageARB },
- { "glXReleaseTexImageARB", (GLvoid *) glXReleaseTexImageARB },
- { "glXDrawableAttribARB", (GLvoid *) glXDrawableAttribARB },
+ { "glXGetAGPOffsetMESA", (__GLXextFuncPtr) glXGetAGPOffsetMESA },
{ NULL, NULL } /* end of list */
};
@@ -1304,7 +1340,7 @@ static struct name_address_pair GLX_functions[] = {
/*
* Return address of named glX function, or NULL if not found.
*/
-const GLvoid *
+__GLXextFuncPtr
_glxapi_get_proc_address(const char *funcName)
{
GLuint i;
@@ -1321,17 +1357,17 @@ _glxapi_get_proc_address(const char *funcName)
* This function does not get dispatched through the dispatch table
* since it's really a "meta" function.
*/
-void (*glXGetProcAddressARB(const GLubyte *procName))()
+__GLXextFuncPtr
+glXGetProcAddressARB(const GLubyte *procName)
{
- typedef void (*gl_function)();
- gl_function f;
+ __GLXextFuncPtr f;
- f = (gl_function) _glxapi_get_proc_address((const char *) procName);
+ f = _glxapi_get_proc_address((const char *) procName);
if (f) {
return f;
}
- f = (gl_function) _glapi_get_proc_address((const char *) procName);
+ f = (__GLXextFuncPtr) _glapi_get_proc_address((const char *) procName);
return f;
}