mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 18:00:13 +01:00
glx: Use _X_EXPORT instead of our own PUBLIC macro
We're an X client library, so we can use Xfuncproto.h.
This commit is contained in:
parent
65d98e2577
commit
38c51a7653
7 changed files with 74 additions and 101 deletions
|
|
@ -39,21 +39,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
|
|
||||||
#include <X11/Xlibint.h>
|
#include <X11/Xlibint.h>
|
||||||
|
#include <X11/Xfuncproto.h>
|
||||||
#include <X11/extensions/Xext.h>
|
#include <X11/extensions/Xext.h>
|
||||||
#include <X11/extensions/extutil.h>
|
#include <X11/extensions/extutil.h>
|
||||||
#include "xf86dristr.h"
|
#include "xf86dristr.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
# define PUBLIC __attribute__((visibility("default")))
|
|
||||||
# define USED __attribute__((used))
|
|
||||||
#else
|
|
||||||
# define PUBLIC
|
|
||||||
# define USED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static XExtensionInfo _xf86dri_info_data;
|
static XExtensionInfo _xf86dri_info_data;
|
||||||
static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
|
static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
|
||||||
static char xf86dri_extension_name[] = XF86DRINAME;
|
static char xf86dri_extension_name[] = XF86DRINAME;
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ glXReleaseBuffersMESA(Display * dpy, GLXDrawable d)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC GLXPixmap
|
_X_EXPORT GLXPixmap
|
||||||
glXCreateGLXPixmapMESA(Display * dpy, XVisualInfo * visual,
|
glXCreateGLXPixmapMESA(Display * dpy, XVisualInfo * visual,
|
||||||
Pixmap pixmap, Colormap cmap)
|
Pixmap pixmap, Colormap cmap)
|
||||||
{
|
{
|
||||||
|
|
@ -180,7 +180,7 @@ glXCopySubBufferMESA(Display * dpy, GLXDrawable drawable,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC int
|
_X_EXPORT int
|
||||||
glXQueryGLXPbufferSGIX(Display * dpy, GLXDrawable drawable,
|
glXQueryGLXPbufferSGIX(Display * dpy, GLXDrawable drawable,
|
||||||
int attribute, unsigned int *value)
|
int attribute, unsigned int *value)
|
||||||
{
|
{
|
||||||
|
|
@ -191,7 +191,7 @@ glXQueryGLXPbufferSGIX(Display * dpy, GLXDrawable drawable,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC GLXDrawable
|
_X_EXPORT GLXDrawable
|
||||||
glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfig config,
|
glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfig config,
|
||||||
unsigned int width, unsigned int height,
|
unsigned int width, unsigned int height,
|
||||||
int *attrib_list)
|
int *attrib_list)
|
||||||
|
|
@ -206,7 +206,7 @@ glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfig config,
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* GLX_SGIX_fbconfig */
|
/* GLX_SGIX_fbconfig */
|
||||||
PUBLIC int
|
_X_EXPORT int
|
||||||
glXGetFBConfigAttribSGIX(Display * dpy, void *config, int a, int *b)
|
glXGetFBConfigAttribSGIX(Display * dpy, void *config, int a, int *b)
|
||||||
{
|
{
|
||||||
(void) dpy;
|
(void) dpy;
|
||||||
|
|
@ -216,7 +216,7 @@ glXGetFBConfigAttribSGIX(Display * dpy, void *config, int a, int *b)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC void *
|
_X_EXPORT void *
|
||||||
glXChooseFBConfigSGIX(Display * dpy, int a, int *b, int *c)
|
glXChooseFBConfigSGIX(Display * dpy, int a, int *b, int *c)
|
||||||
{
|
{
|
||||||
(void) dpy;
|
(void) dpy;
|
||||||
|
|
@ -226,7 +226,7 @@ glXChooseFBConfigSGIX(Display * dpy, int a, int *b, int *c)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC GLXPixmap
|
_X_EXPORT GLXPixmap
|
||||||
glXCreateGLXPixmapWithConfigSGIX(Display * dpy, void *config, Pixmap p)
|
glXCreateGLXPixmapWithConfigSGIX(Display * dpy, void *config, Pixmap p)
|
||||||
{
|
{
|
||||||
(void) dpy;
|
(void) dpy;
|
||||||
|
|
@ -235,7 +235,7 @@ glXCreateGLXPixmapWithConfigSGIX(Display * dpy, void *config, Pixmap p)
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC GLXContext
|
_X_EXPORT GLXContext
|
||||||
glXCreateContextWithConfigSGIX(Display * dpy, void *config, int a,
|
glXCreateContextWithConfigSGIX(Display * dpy, void *config, int a,
|
||||||
GLXContext b, Bool c)
|
GLXContext b, Bool c)
|
||||||
{
|
{
|
||||||
|
|
@ -247,7 +247,7 @@ glXCreateContextWithConfigSGIX(Display * dpy, void *config, int a,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC XVisualInfo *
|
_X_EXPORT XVisualInfo *
|
||||||
glXGetVisualFromFBConfigSGIX(Display * dpy, void *config)
|
glXGetVisualFromFBConfigSGIX(Display * dpy, void *config)
|
||||||
{
|
{
|
||||||
(void) dpy;
|
(void) dpy;
|
||||||
|
|
@ -255,7 +255,7 @@ glXGetVisualFromFBConfigSGIX(Display * dpy, void *config)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC void *
|
_X_EXPORT void *
|
||||||
glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * visinfo)
|
glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * visinfo)
|
||||||
{
|
{
|
||||||
(void) dpy;
|
(void) dpy;
|
||||||
|
|
@ -265,17 +265,17 @@ glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * visinfo)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
PUBLIC
|
_X_EXPORT
|
||||||
GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX,
|
GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX,
|
||||||
(Display * dpy, GLXDrawable pbuf),
|
(Display * dpy, GLXDrawable pbuf),
|
||||||
(dpy, pbuf), glXDestroyPbuffer)
|
(dpy, pbuf), glXDestroyPbuffer)
|
||||||
|
|
||||||
PUBLIC GLX_ALIAS_VOID(glXSelectEventSGIX,
|
_X_EXPORT GLX_ALIAS_VOID(glXSelectEventSGIX,
|
||||||
(Display * dpy, GLXDrawable drawable,
|
(Display * dpy, GLXDrawable drawable,
|
||||||
unsigned long mask), (dpy, drawable, mask),
|
unsigned long mask), (dpy, drawable, mask),
|
||||||
glXSelectEvent)
|
glXSelectEvent)
|
||||||
|
|
||||||
PUBLIC GLX_ALIAS_VOID(glXGetSelectedEventSGIX,
|
_X_EXPORT GLX_ALIAS_VOID(glXGetSelectedEventSGIX,
|
||||||
(Display * dpy, GLXDrawable drawable,
|
(Display * dpy, GLXDrawable drawable,
|
||||||
unsigned long *mask), (dpy, drawable, mask),
|
unsigned long *mask), (dpy, drawable, mask),
|
||||||
glXGetSelectedEvent)
|
glXGetSelectedEvent)
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ driGetDriverName(Display * dpy, int scrNum, char **driverName)
|
||||||
* The returned char pointer points to a static array that will be
|
* The returned char pointer points to a static array that will be
|
||||||
* overwritten by subsequent calls.
|
* overwritten by subsequent calls.
|
||||||
*/
|
*/
|
||||||
PUBLIC const char *
|
_X_EXPORT const char *
|
||||||
glXGetScreenDriver(Display * dpy, int scrNum)
|
glXGetScreenDriver(Display * dpy, int scrNum)
|
||||||
{
|
{
|
||||||
static char ret[32];
|
static char ret[32];
|
||||||
|
|
@ -181,7 +181,7 @@ glXGetScreenDriver(Display * dpy, int scrNum)
|
||||||
*
|
*
|
||||||
* Note: The driver remains opened after this function returns.
|
* Note: The driver remains opened after this function returns.
|
||||||
*/
|
*/
|
||||||
PUBLIC const char *
|
_X_EXPORT const char *
|
||||||
glXGetDriverConfig(const char *driverName)
|
glXGetDriverConfig(const char *driverName)
|
||||||
{
|
{
|
||||||
void *handle = driOpenDriver(driverName);
|
void *handle = driOpenDriver(driverName);
|
||||||
|
|
|
||||||
|
|
@ -593,7 +593,7 @@ DestroyPbuffer(Display * dpy, GLXDrawable drawable)
|
||||||
/**
|
/**
|
||||||
* Create a new pbuffer.
|
* Create a new pbuffer.
|
||||||
*/
|
*/
|
||||||
PUBLIC GLXPbufferSGIX
|
_X_EXPORT GLXPbufferSGIX
|
||||||
glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfigSGIX config,
|
glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfigSGIX config,
|
||||||
unsigned int width, unsigned int height,
|
unsigned int width, unsigned int height,
|
||||||
int *attrib_list)
|
int *attrib_list)
|
||||||
|
|
@ -608,7 +608,7 @@ glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfigSGIX config,
|
||||||
/**
|
/**
|
||||||
* Create a new pbuffer.
|
* Create a new pbuffer.
|
||||||
*/
|
*/
|
||||||
PUBLIC GLXPbuffer
|
_X_EXPORT GLXPbuffer
|
||||||
glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list)
|
glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list)
|
||||||
{
|
{
|
||||||
int i, width, height;
|
int i, width, height;
|
||||||
|
|
@ -683,7 +683,7 @@ glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list)
|
||||||
/**
|
/**
|
||||||
* Destroy an existing pbuffer.
|
* Destroy an existing pbuffer.
|
||||||
*/
|
*/
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXDestroyPbuffer(Display * dpy, GLXPbuffer pbuf)
|
glXDestroyPbuffer(Display * dpy, GLXPbuffer pbuf)
|
||||||
{
|
{
|
||||||
#ifdef GLX_USE_APPLEGL
|
#ifdef GLX_USE_APPLEGL
|
||||||
|
|
@ -699,7 +699,7 @@ glXDestroyPbuffer(Display * dpy, GLXPbuffer pbuf)
|
||||||
/**
|
/**
|
||||||
* Query an attribute of a drawable.
|
* Query an attribute of a drawable.
|
||||||
*/
|
*/
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXQueryDrawable(Display * dpy, GLXDrawable drawable,
|
glXQueryDrawable(Display * dpy, GLXDrawable drawable,
|
||||||
int attribute, unsigned int *value)
|
int attribute, unsigned int *value)
|
||||||
{
|
{
|
||||||
|
|
@ -748,7 +748,7 @@ glXQueryDrawable(Display * dpy, GLXDrawable drawable,
|
||||||
/**
|
/**
|
||||||
* Query an attribute of a pbuffer.
|
* Query an attribute of a pbuffer.
|
||||||
*/
|
*/
|
||||||
PUBLIC int
|
_X_EXPORT int
|
||||||
glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable,
|
glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable,
|
||||||
int attribute, unsigned int *value)
|
int attribute, unsigned int *value)
|
||||||
{
|
{
|
||||||
|
|
@ -759,7 +759,7 @@ glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable,
|
||||||
/**
|
/**
|
||||||
* Select the event mask for a drawable.
|
* Select the event mask for a drawable.
|
||||||
*/
|
*/
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask)
|
glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask)
|
||||||
{
|
{
|
||||||
#ifdef GLX_USE_APPLEGL
|
#ifdef GLX_USE_APPLEGL
|
||||||
|
|
@ -792,7 +792,7 @@ glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask)
|
||||||
/**
|
/**
|
||||||
* Get the selected event mask for a drawable.
|
* Get the selected event mask for a drawable.
|
||||||
*/
|
*/
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask)
|
glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask)
|
||||||
{
|
{
|
||||||
#ifdef GLX_USE_APPLEGL
|
#ifdef GLX_USE_APPLEGL
|
||||||
|
|
@ -829,7 +829,7 @@ glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC GLXPixmap
|
_X_EXPORT GLXPixmap
|
||||||
glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap,
|
glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap,
|
||||||
const int *attrib_list)
|
const int *attrib_list)
|
||||||
{
|
{
|
||||||
|
|
@ -849,7 +849,7 @@ glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC GLXWindow
|
_X_EXPORT GLXWindow
|
||||||
glXCreateWindow(Display * dpy, GLXFBConfig config, Window win,
|
glXCreateWindow(Display * dpy, GLXFBConfig config, Window win,
|
||||||
const int *attrib_list)
|
const int *attrib_list)
|
||||||
{
|
{
|
||||||
|
|
@ -884,7 +884,7 @@ glXCreateWindow(Display * dpy, GLXFBConfig config, Window win,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXDestroyPixmap(Display * dpy, GLXPixmap pixmap)
|
glXDestroyPixmap(Display * dpy, GLXPixmap pixmap)
|
||||||
{
|
{
|
||||||
WARN_ONCE_GLX_1_3(dpy, __func__);
|
WARN_ONCE_GLX_1_3(dpy, __func__);
|
||||||
|
|
@ -897,7 +897,7 @@ glXDestroyPixmap(Display * dpy, GLXPixmap pixmap)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXDestroyWindow(Display * dpy, GLXWindow win)
|
glXDestroyWindow(Display * dpy, GLXWindow win)
|
||||||
{
|
{
|
||||||
WARN_ONCE_GLX_1_3(dpy, __func__);
|
WARN_ONCE_GLX_1_3(dpy, __func__);
|
||||||
|
|
@ -907,17 +907,17 @@ glXDestroyWindow(Display * dpy, GLXWindow win)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef GLX_USE_APPLEGL
|
#ifndef GLX_USE_APPLEGL
|
||||||
PUBLIC
|
_X_EXPORT
|
||||||
GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX,
|
GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX,
|
||||||
(Display * dpy, GLXPbufferSGIX pbuf),
|
(Display * dpy, GLXPbufferSGIX pbuf),
|
||||||
(dpy, pbuf), glXDestroyPbuffer)
|
(dpy, pbuf), glXDestroyPbuffer)
|
||||||
|
|
||||||
PUBLIC
|
_X_EXPORT
|
||||||
GLX_ALIAS_VOID(glXSelectEventSGIX,
|
GLX_ALIAS_VOID(glXSelectEventSGIX,
|
||||||
(Display * dpy, GLXDrawable drawable,
|
(Display * dpy, GLXDrawable drawable,
|
||||||
unsigned long mask), (dpy, drawable, mask), glXSelectEvent)
|
unsigned long mask), (dpy, drawable, mask), glXSelectEvent)
|
||||||
|
|
||||||
PUBLIC
|
_X_EXPORT
|
||||||
GLX_ALIAS_VOID(glXGetSelectedEventSGIX,
|
GLX_ALIAS_VOID(glXGetSelectedEventSGIX,
|
||||||
(Display * dpy, GLXDrawable drawable,
|
(Display * dpy, GLXDrawable drawable,
|
||||||
unsigned long *mask), (dpy, drawable, mask),
|
unsigned long *mask), (dpy, drawable, mask),
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
#define _GLX_client_h_
|
#define _GLX_client_h_
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
#include <X11/Xlibint.h>
|
#include <X11/Xlibint.h>
|
||||||
|
#include <X11/Xfuncproto.h>
|
||||||
#include <X11/extensions/extutil.h>
|
#include <X11/extensions/extutil.h>
|
||||||
#define GLX_GLXEXT_PROTOTYPES
|
#define GLX_GLXEXT_PROTOTYPES
|
||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
|
|
@ -59,21 +60,6 @@
|
||||||
|
|
||||||
#include "glxextensions.h"
|
#include "glxextensions.h"
|
||||||
|
|
||||||
|
|
||||||
/* If we build the library with gcc's -fvisibility=hidden flag, we'll
|
|
||||||
* use the PUBLIC macro to mark functions that are to be exported.
|
|
||||||
*
|
|
||||||
* We also need to define a USED attribute, so the optimizer doesn't
|
|
||||||
* inline a static function that we later use in an alias. - ajax
|
|
||||||
*/
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
# define PUBLIC __attribute__((visibility("default")))
|
|
||||||
# define USED __attribute__((used))
|
|
||||||
#else
|
|
||||||
# define PUBLIC
|
|
||||||
# define USED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
|
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
|
||||||
|
|
||||||
#define GLX_MAJOR_VERSION 1 /* current version numbers */
|
#define GLX_MAJOR_VERSION 1 /* current version numbers */
|
||||||
|
|
@ -91,9 +77,6 @@ typedef struct _glapi_table __GLapi;
|
||||||
|
|
||||||
#ifdef GLX_DIRECT_RENDERING
|
#ifdef GLX_DIRECT_RENDERING
|
||||||
|
|
||||||
#define containerOf(ptr, type, member) \
|
|
||||||
(type *)( (char *)ptr - offsetof(type,member) )
|
|
||||||
|
|
||||||
extern void DRI_glXUseXFont(GLXContext CC,
|
extern void DRI_glXUseXFont(GLXContext CC,
|
||||||
Font font, int first, int count, int listbase);
|
Font font, int first, int count, int listbase);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -532,7 +532,7 @@ CreateContext(Display * dpy, int generic_id,
|
||||||
return gc;
|
return gc;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC GLXContext
|
_X_EXPORT GLXContext
|
||||||
glXCreateContext(Display * dpy, XVisualInfo * vis,
|
glXCreateContext(Display * dpy, XVisualInfo * vis,
|
||||||
GLXContext shareList, Bool allowDirect)
|
GLXContext shareList, Bool allowDirect)
|
||||||
{
|
{
|
||||||
|
|
@ -628,7 +628,7 @@ DestroyContext(Display * dpy, GLXContext gc)
|
||||||
gc->vtable->destroy(gc);
|
gc->vtable->destroy(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXDestroyContext(Display * dpy, GLXContext gc)
|
glXDestroyContext(Display * dpy, GLXContext gc)
|
||||||
{
|
{
|
||||||
DestroyContext(dpy, gc);
|
DestroyContext(dpy, gc);
|
||||||
|
|
@ -637,7 +637,7 @@ glXDestroyContext(Display * dpy, GLXContext gc)
|
||||||
/*
|
/*
|
||||||
** Return the major and minor version #s for the GLX extension
|
** Return the major and minor version #s for the GLX extension
|
||||||
*/
|
*/
|
||||||
PUBLIC Bool
|
_X_EXPORT Bool
|
||||||
glXQueryVersion(Display * dpy, int *major, int *minor)
|
glXQueryVersion(Display * dpy, int *major, int *minor)
|
||||||
{
|
{
|
||||||
__GLXdisplayPrivate *priv;
|
__GLXdisplayPrivate *priv;
|
||||||
|
|
@ -657,7 +657,7 @@ glXQueryVersion(Display * dpy, int *major, int *minor)
|
||||||
/*
|
/*
|
||||||
** Query the existance of the GLX extension
|
** Query the existance of the GLX extension
|
||||||
*/
|
*/
|
||||||
PUBLIC Bool
|
_X_EXPORT Bool
|
||||||
glXQueryExtension(Display * dpy, int *errorBase, int *eventBase)
|
glXQueryExtension(Display * dpy, int *errorBase, int *eventBase)
|
||||||
{
|
{
|
||||||
int major_op, erb, evb;
|
int major_op, erb, evb;
|
||||||
|
|
@ -696,7 +696,7 @@ indirect_wait_gl(__GLXcontext *gc)
|
||||||
** Put a barrier in the token stream that forces the GL to finish its
|
** Put a barrier in the token stream that forces the GL to finish its
|
||||||
** work before X can proceed.
|
** work before X can proceed.
|
||||||
*/
|
*/
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXWaitGL(void)
|
glXWaitGL(void)
|
||||||
{
|
{
|
||||||
GLXContext gc = __glXGetCurrentContext();
|
GLXContext gc = __glXGetCurrentContext();
|
||||||
|
|
@ -727,7 +727,7 @@ indirect_wait_x(__GLXcontext *gc)
|
||||||
** Put a barrier in the token stream that forces X to finish its
|
** Put a barrier in the token stream that forces X to finish its
|
||||||
** work before GL can proceed.
|
** work before GL can proceed.
|
||||||
*/
|
*/
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXWaitX(void)
|
glXWaitX(void)
|
||||||
{
|
{
|
||||||
GLXContext gc = __glXGetCurrentContext();
|
GLXContext gc = __glXGetCurrentContext();
|
||||||
|
|
@ -791,7 +791,7 @@ static const struct glx_context_vtable applegl_context_vtable = {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXUseXFont(Font font, int first, int count, int listBase)
|
glXUseXFont(Font font, int first, int count, int listBase)
|
||||||
{
|
{
|
||||||
GLXContext gc = __glXGetCurrentContext();
|
GLXContext gc = __glXGetCurrentContext();
|
||||||
|
|
@ -806,7 +806,7 @@ glXUseXFont(Font font, int first, int count, int listBase)
|
||||||
** Copy the source context to the destination context using the
|
** Copy the source context to the destination context using the
|
||||||
** attribute "mask".
|
** attribute "mask".
|
||||||
*/
|
*/
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXCopyContext(Display * dpy, GLXContext source,
|
glXCopyContext(Display * dpy, GLXContext source,
|
||||||
GLXContext dest, unsigned long mask)
|
GLXContext dest, unsigned long mask)
|
||||||
{
|
{
|
||||||
|
|
@ -917,7 +917,7 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
|
||||||
* \c GLX_DIRECT_RENDERING is not defined? Do we really need to bother with
|
* \c GLX_DIRECT_RENDERING is not defined? Do we really need to bother with
|
||||||
* the GLX protocol here at all?
|
* the GLX protocol here at all?
|
||||||
*/
|
*/
|
||||||
PUBLIC Bool
|
_X_EXPORT Bool
|
||||||
glXIsDirect(Display * dpy, GLXContext gc)
|
glXIsDirect(Display * dpy, GLXContext gc)
|
||||||
{
|
{
|
||||||
if (!gc) {
|
if (!gc) {
|
||||||
|
|
@ -933,7 +933,7 @@ glXIsDirect(Display * dpy, GLXContext gc)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC GLXPixmap
|
_X_EXPORT GLXPixmap
|
||||||
glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
|
glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
|
||||||
{
|
{
|
||||||
#ifdef GLX_USE_APPLEGL
|
#ifdef GLX_USE_APPLEGL
|
||||||
|
|
@ -1003,7 +1003,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
|
||||||
/*
|
/*
|
||||||
** Destroy the named pixmap
|
** Destroy the named pixmap
|
||||||
*/
|
*/
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap)
|
glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap)
|
||||||
{
|
{
|
||||||
#ifdef GLX_USE_APPLEGL
|
#ifdef GLX_USE_APPLEGL
|
||||||
|
|
@ -1041,7 +1041,7 @@ glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap)
|
||||||
#endif /* GLX_USE_APPLEGL */
|
#endif /* GLX_USE_APPLEGL */
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXSwapBuffers(Display * dpy, GLXDrawable drawable)
|
glXSwapBuffers(Display * dpy, GLXDrawable drawable)
|
||||||
{
|
{
|
||||||
#ifdef GLX_USE_APPLEGL
|
#ifdef GLX_USE_APPLEGL
|
||||||
|
|
@ -1114,7 +1114,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
|
||||||
** Return configuration information for the given display, screen and
|
** Return configuration information for the given display, screen and
|
||||||
** visual combination.
|
** visual combination.
|
||||||
*/
|
*/
|
||||||
PUBLIC int
|
_X_EXPORT int
|
||||||
glXGetConfig(Display * dpy, XVisualInfo * vis, int attribute,
|
glXGetConfig(Display * dpy, XVisualInfo * vis, int attribute,
|
||||||
int *value_return)
|
int *value_return)
|
||||||
{
|
{
|
||||||
|
|
@ -1475,7 +1475,7 @@ choose_visual(struct glx_config ** configs, int num_configs,
|
||||||
** Return the visual that best matches the template. Return None if no
|
** Return the visual that best matches the template. Return None if no
|
||||||
** visual matches the template.
|
** visual matches the template.
|
||||||
*/
|
*/
|
||||||
PUBLIC XVisualInfo *
|
_X_EXPORT XVisualInfo *
|
||||||
glXChooseVisual(Display * dpy, int screen, int *attribList)
|
glXChooseVisual(Display * dpy, int screen, int *attribList)
|
||||||
{
|
{
|
||||||
XVisualInfo *visualList = NULL;
|
XVisualInfo *visualList = NULL;
|
||||||
|
|
@ -1541,7 +1541,7 @@ glXChooseVisual(Display * dpy, int screen, int *attribList)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC const char *
|
_X_EXPORT const char *
|
||||||
glXQueryExtensionsString(Display * dpy, int screen)
|
glXQueryExtensionsString(Display * dpy, int screen)
|
||||||
{
|
{
|
||||||
__GLXscreenConfigs *psc;
|
__GLXscreenConfigs *psc;
|
||||||
|
|
@ -1570,7 +1570,7 @@ glXQueryExtensionsString(Display * dpy, int screen)
|
||||||
return psc->effectiveGLXexts;
|
return psc->effectiveGLXexts;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC const char *
|
_X_EXPORT const char *
|
||||||
glXGetClientString(Display * dpy, int name)
|
glXGetClientString(Display * dpy, int name)
|
||||||
{
|
{
|
||||||
(void) dpy;
|
(void) dpy;
|
||||||
|
|
@ -1587,7 +1587,7 @@ glXGetClientString(Display * dpy, int name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC const char *
|
_X_EXPORT const char *
|
||||||
glXQueryServerString(Display * dpy, int screen, int name)
|
glXQueryServerString(Display * dpy, int screen, int name)
|
||||||
{
|
{
|
||||||
__GLXscreenConfigs *psc;
|
__GLXscreenConfigs *psc;
|
||||||
|
|
@ -1657,7 +1657,7 @@ __glXClientInfo(Display * dpy, int opcode)
|
||||||
** EXT_import_context
|
** EXT_import_context
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PUBLIC Display *
|
_X_EXPORT Display *
|
||||||
glXGetCurrentDisplay(void)
|
glXGetCurrentDisplay(void)
|
||||||
{
|
{
|
||||||
GLXContext gc = __glXGetCurrentContext();
|
GLXContext gc = __glXGetCurrentContext();
|
||||||
|
|
@ -1666,12 +1666,12 @@ glXGetCurrentDisplay(void)
|
||||||
return gc->currentDpy;
|
return gc->currentDpy;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC
|
_X_EXPORT
|
||||||
GLX_ALIAS(Display *, glXGetCurrentDisplayEXT, (void), (),
|
GLX_ALIAS(Display *, glXGetCurrentDisplayEXT, (void), (),
|
||||||
glXGetCurrentDisplay)
|
glXGetCurrentDisplay)
|
||||||
|
|
||||||
#ifndef GLX_USE_APPLEGL
|
#ifndef GLX_USE_APPLEGL
|
||||||
PUBLIC GLXContext
|
_X_EXPORT GLXContext
|
||||||
glXImportContextEXT(Display *dpy, GLXContextID contextID)
|
glXImportContextEXT(Display *dpy, GLXContextID contextID)
|
||||||
{
|
{
|
||||||
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
||||||
|
|
@ -1772,7 +1772,7 @@ glXImportContextEXT(Display *dpy, GLXContextID contextID)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PUBLIC int
|
_X_EXPORT int
|
||||||
glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value)
|
glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value)
|
||||||
{
|
{
|
||||||
switch (attribute) {
|
switch (attribute) {
|
||||||
|
|
@ -1797,24 +1797,24 @@ glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC
|
_X_EXPORT
|
||||||
GLX_ALIAS(int, glXQueryContextInfoEXT,
|
GLX_ALIAS(int, glXQueryContextInfoEXT,
|
||||||
(Display * dpy, GLXContext ctx, int attribute, int *value),
|
(Display * dpy, GLXContext ctx, int attribute, int *value),
|
||||||
(dpy, ctx, attribute, value), glXQueryContext)
|
(dpy, ctx, attribute, value), glXQueryContext)
|
||||||
|
|
||||||
PUBLIC GLXContextID glXGetContextIDEXT(const GLXContext ctx)
|
_X_EXPORT GLXContextID glXGetContextIDEXT(const GLXContext ctx)
|
||||||
{
|
{
|
||||||
return ctx->xid;
|
return ctx->xid;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC void
|
_X_EXPORT void
|
||||||
glXFreeContextEXT(Display * dpy, GLXContext ctx)
|
glXFreeContextEXT(Display * dpy, GLXContext ctx)
|
||||||
{
|
{
|
||||||
DestroyContext(dpy, ctx);
|
DestroyContext(dpy, ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC GLXFBConfig *
|
_X_EXPORT GLXFBConfig *
|
||||||
glXChooseFBConfig(Display * dpy, int screen,
|
glXChooseFBConfig(Display * dpy, int screen,
|
||||||
const int *attribList, int *nitems)
|
const int *attribList, int *nitems)
|
||||||
{
|
{
|
||||||
|
|
@ -1838,7 +1838,7 @@ glXChooseFBConfig(Display * dpy, int screen,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC GLXContext
|
_X_EXPORT GLXContext
|
||||||
glXCreateNewContext(Display * dpy, GLXFBConfig fbconfig,
|
glXCreateNewContext(Display * dpy, GLXFBConfig fbconfig,
|
||||||
int renderType, GLXContext shareList, Bool allowDirect)
|
int renderType, GLXContext shareList, Bool allowDirect)
|
||||||
{
|
{
|
||||||
|
|
@ -1850,7 +1850,7 @@ glXCreateNewContext(Display * dpy, GLXFBConfig fbconfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC GLXDrawable
|
_X_EXPORT GLXDrawable
|
||||||
glXGetCurrentReadDrawable(void)
|
glXGetCurrentReadDrawable(void)
|
||||||
{
|
{
|
||||||
GLXContext gc = __glXGetCurrentContext();
|
GLXContext gc = __glXGetCurrentContext();
|
||||||
|
|
@ -1858,7 +1858,7 @@ glXGetCurrentReadDrawable(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC GLXFBConfig *
|
_X_EXPORT GLXFBConfig *
|
||||||
glXGetFBConfigs(Display * dpy, int screen, int *nelements)
|
glXGetFBConfigs(Display * dpy, int screen, int *nelements)
|
||||||
{
|
{
|
||||||
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
||||||
|
|
@ -1899,7 +1899,7 @@ glXGetFBConfigs(Display * dpy, int screen, int *nelements)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC int
|
_X_EXPORT int
|
||||||
glXGetFBConfigAttrib(Display * dpy, GLXFBConfig fbconfig,
|
glXGetFBConfigAttrib(Display * dpy, GLXFBConfig fbconfig,
|
||||||
int attribute, int *value)
|
int attribute, int *value)
|
||||||
{
|
{
|
||||||
|
|
@ -1912,7 +1912,7 @@ glXGetFBConfigAttrib(Display * dpy, GLXFBConfig fbconfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC XVisualInfo *
|
_X_EXPORT XVisualInfo *
|
||||||
glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig fbconfig)
|
glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig fbconfig)
|
||||||
{
|
{
|
||||||
XVisualInfo visualTemplate;
|
XVisualInfo visualTemplate;
|
||||||
|
|
@ -2120,21 +2120,21 @@ __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
|
||||||
** GLX_functions table.
|
** GLX_functions table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PUBLIC
|
_X_EXPORT
|
||||||
GLX_ALIAS(int, glXGetFBConfigAttribSGIX,
|
GLX_ALIAS(int, glXGetFBConfigAttribSGIX,
|
||||||
(Display * dpy, GLXFBConfigSGIX config, int attribute, int *value),
|
(Display * dpy, GLXFBConfigSGIX config, int attribute, int *value),
|
||||||
(dpy, config, attribute, value), glXGetFBConfigAttrib)
|
(dpy, config, attribute, value), glXGetFBConfigAttrib)
|
||||||
|
|
||||||
PUBLIC GLX_ALIAS(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
|
_X_EXPORT GLX_ALIAS(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
|
||||||
(Display * dpy, int screen, int *attrib_list,
|
(Display * dpy, int screen, int *attrib_list,
|
||||||
int *nelements), (dpy, screen, attrib_list, nelements),
|
int *nelements), (dpy, screen, attrib_list, nelements),
|
||||||
glXChooseFBConfig)
|
glXChooseFBConfig)
|
||||||
|
|
||||||
PUBLIC GLX_ALIAS(XVisualInfo *, glXGetVisualFromFBConfigSGIX,
|
_X_EXPORT GLX_ALIAS(XVisualInfo *, glXGetVisualFromFBConfigSGIX,
|
||||||
(Display * dpy, GLXFBConfigSGIX config),
|
(Display * dpy, GLXFBConfigSGIX config),
|
||||||
(dpy, config), glXGetVisualFromFBConfig)
|
(dpy, config), glXGetVisualFromFBConfig)
|
||||||
|
|
||||||
PUBLIC GLXPixmap
|
_X_EXPORT GLXPixmap
|
||||||
glXCreateGLXPixmapWithConfigSGIX(Display * dpy,
|
glXCreateGLXPixmapWithConfigSGIX(Display * dpy,
|
||||||
GLXFBConfigSGIX fbconfig,
|
GLXFBConfigSGIX fbconfig,
|
||||||
Pixmap pixmap)
|
Pixmap pixmap)
|
||||||
|
|
@ -2187,7 +2187,7 @@ glXCreateGLXPixmapWithConfigSGIX(Display * dpy,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC GLXContext
|
_X_EXPORT GLXContext
|
||||||
glXCreateContextWithConfigSGIX(Display * dpy,
|
glXCreateContextWithConfigSGIX(Display * dpy,
|
||||||
GLXFBConfigSGIX fbconfig, int renderType,
|
GLXFBConfigSGIX fbconfig, int renderType,
|
||||||
GLXContext shareList, Bool allowDirect)
|
GLXContext shareList, Bool allowDirect)
|
||||||
|
|
@ -2214,7 +2214,7 @@ glXCreateContextWithConfigSGIX(Display * dpy,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC GLXFBConfigSGIX
|
_X_EXPORT GLXFBConfigSGIX
|
||||||
glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * vis)
|
glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * vis)
|
||||||
{
|
{
|
||||||
__GLXdisplayPrivate *priv;
|
__GLXdisplayPrivate *priv;
|
||||||
|
|
@ -2538,7 +2538,7 @@ __glXReleaseBuffersMESA(Display * dpy, GLXDrawable d)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC GLXPixmap
|
_X_EXPORT GLXPixmap
|
||||||
glXCreateGLXPixmapMESA(Display * dpy, XVisualInfo * visual,
|
glXCreateGLXPixmapMESA(Display * dpy, XVisualInfo * visual,
|
||||||
Pixmap pixmap, Colormap cmap)
|
Pixmap pixmap, Colormap cmap)
|
||||||
{
|
{
|
||||||
|
|
@ -2932,7 +2932,7 @@ get_glx_proc_address(const char *funcName)
|
||||||
*
|
*
|
||||||
* \sa glXGetProcAddress
|
* \sa glXGetProcAddress
|
||||||
*/
|
*/
|
||||||
PUBLIC void (*glXGetProcAddressARB(const GLubyte * procName)) (void)
|
_X_EXPORT void (*glXGetProcAddressARB(const GLubyte * procName)) (void)
|
||||||
{
|
{
|
||||||
typedef void (*gl_function) (void);
|
typedef void (*gl_function) (void);
|
||||||
gl_function f;
|
gl_function f;
|
||||||
|
|
@ -2965,7 +2965,7 @@ PUBLIC void (*glXGetProcAddressARB(const GLubyte * procName)) (void)
|
||||||
*
|
*
|
||||||
* \sa glXGetProcAddressARB
|
* \sa glXGetProcAddressARB
|
||||||
*/
|
*/
|
||||||
PUBLIC void (*glXGetProcAddress(const GLubyte * procName)) (void)
|
_X_EXPORT void (*glXGetProcAddress(const GLubyte * procName)) (void)
|
||||||
#if defined(__GNUC__) && !defined(GLX_ALIAS_UNSUPPORTED)
|
#if defined(__GNUC__) && !defined(GLX_ALIAS_UNSUPPORTED)
|
||||||
__attribute__ ((alias("glXGetProcAddressARB")));
|
__attribute__ ((alias("glXGetProcAddressARB")));
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ __glXSetCurrentContextNull(void)
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
PUBLIC GLXContext
|
_X_EXPORT GLXContext
|
||||||
glXGetCurrentContext(void)
|
glXGetCurrentContext(void)
|
||||||
{
|
{
|
||||||
GLXContext cx = __glXGetCurrentContext();
|
GLXContext cx = __glXGetCurrentContext();
|
||||||
|
|
@ -192,7 +192,7 @@ glXGetCurrentContext(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC GLXDrawable
|
_X_EXPORT GLXDrawable
|
||||||
glXGetCurrentDrawable(void)
|
glXGetCurrentDrawable(void)
|
||||||
{
|
{
|
||||||
GLXContext gc = __glXGetCurrentContext();
|
GLXContext gc = __glXGetCurrentContext();
|
||||||
|
|
@ -518,18 +518,18 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PUBLIC Bool
|
_X_EXPORT Bool
|
||||||
glXMakeCurrent(Display * dpy, GLXDrawable draw, GLXContext gc)
|
glXMakeCurrent(Display * dpy, GLXDrawable draw, GLXContext gc)
|
||||||
{
|
{
|
||||||
return MakeContextCurrent(dpy, draw, draw, gc);
|
return MakeContextCurrent(dpy, draw, draw, gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC
|
_X_EXPORT
|
||||||
GLX_ALIAS(Bool, glXMakeCurrentReadSGI,
|
GLX_ALIAS(Bool, glXMakeCurrentReadSGI,
|
||||||
(Display * dpy, GLXDrawable d, GLXDrawable r, GLXContext ctx),
|
(Display * dpy, GLXDrawable d, GLXDrawable r, GLXContext ctx),
|
||||||
(dpy, d, r, ctx), MakeContextCurrent)
|
(dpy, d, r, ctx), MakeContextCurrent)
|
||||||
|
|
||||||
PUBLIC
|
_X_EXPORT
|
||||||
GLX_ALIAS(Bool, glXMakeContextCurrent,
|
GLX_ALIAS(Bool, glXMakeContextCurrent,
|
||||||
(Display * dpy, GLXDrawable d, GLXDrawable r,
|
(Display * dpy, GLXDrawable d, GLXDrawable r,
|
||||||
GLXContext ctx), (dpy, d, r, ctx), MakeContextCurrent)
|
GLXContext ctx), (dpy, d, r, ctx), MakeContextCurrent)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue