glx: Implement the libglvnd interface.
With reference to the libglvnd branch: https://cgit.freedesktop.org/mesa/mesa/log/?h=libglvnd This is a squashed commit containing all of Kyle's commits, all but two of Emil's commits (to follow), and a small fixup from myself to mark the rest of the glX* functions as _GLX_PUBLIC so they are not exported when building for libglvnd. I (ajax) squashed them together both for ease of review, and because most of the changes are un-useful intermediate states representing the evolution of glvnd's internal API. Co-author: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:

committed by
Emil Velikov

parent
cee459d84d
commit
22a9e00aab
@@ -679,7 +679,7 @@ DestroyPbuffer(Display * dpy, GLXDrawable drawable)
|
||||
/**
|
||||
* Create a new pbuffer.
|
||||
*/
|
||||
_X_EXPORT GLXPbufferSGIX
|
||||
_GLX_PUBLIC GLXPbufferSGIX
|
||||
glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfigSGIX config,
|
||||
unsigned int width, unsigned int height,
|
||||
int *attrib_list)
|
||||
@@ -694,7 +694,7 @@ glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfigSGIX config,
|
||||
/**
|
||||
* Create a new pbuffer.
|
||||
*/
|
||||
_X_EXPORT GLXPbuffer
|
||||
_GLX_PUBLIC GLXPbuffer
|
||||
glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list)
|
||||
{
|
||||
int i, width, height;
|
||||
@@ -769,7 +769,7 @@ glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list)
|
||||
/**
|
||||
* Destroy an existing pbuffer.
|
||||
*/
|
||||
_X_EXPORT void
|
||||
_GLX_PUBLIC void
|
||||
glXDestroyPbuffer(Display * dpy, GLXPbuffer pbuf)
|
||||
{
|
||||
#ifdef GLX_USE_APPLEGL
|
||||
@@ -785,7 +785,7 @@ glXDestroyPbuffer(Display * dpy, GLXPbuffer pbuf)
|
||||
/**
|
||||
* Query an attribute of a drawable.
|
||||
*/
|
||||
_X_EXPORT void
|
||||
_GLX_PUBLIC void
|
||||
glXQueryDrawable(Display * dpy, GLXDrawable drawable,
|
||||
int attribute, unsigned int *value)
|
||||
{
|
||||
@@ -834,7 +834,7 @@ glXQueryDrawable(Display * dpy, GLXDrawable drawable,
|
||||
/**
|
||||
* Query an attribute of a pbuffer.
|
||||
*/
|
||||
_X_EXPORT int
|
||||
_GLX_PUBLIC int
|
||||
glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable,
|
||||
int attribute, unsigned int *value)
|
||||
{
|
||||
@@ -845,7 +845,7 @@ glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable,
|
||||
/**
|
||||
* Select the event mask for a drawable.
|
||||
*/
|
||||
_X_EXPORT void
|
||||
_GLX_PUBLIC void
|
||||
glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask)
|
||||
{
|
||||
#ifdef GLX_USE_APPLEGL
|
||||
@@ -878,7 +878,7 @@ glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask)
|
||||
/**
|
||||
* Get the selected event mask for a drawable.
|
||||
*/
|
||||
_X_EXPORT void
|
||||
_GLX_PUBLIC void
|
||||
glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask)
|
||||
{
|
||||
#ifdef GLX_USE_APPLEGL
|
||||
@@ -915,7 +915,7 @@ glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask)
|
||||
}
|
||||
|
||||
|
||||
_X_EXPORT GLXPixmap
|
||||
_GLX_PUBLIC GLXPixmap
|
||||
glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap,
|
||||
const int *attrib_list)
|
||||
{
|
||||
@@ -935,7 +935,7 @@ glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap,
|
||||
}
|
||||
|
||||
|
||||
_X_EXPORT GLXWindow
|
||||
_GLX_PUBLIC GLXWindow
|
||||
glXCreateWindow(Display * dpy, GLXFBConfig config, Window win,
|
||||
const int *attrib_list)
|
||||
{
|
||||
@@ -970,7 +970,7 @@ glXCreateWindow(Display * dpy, GLXFBConfig config, Window win,
|
||||
}
|
||||
|
||||
|
||||
_X_EXPORT void
|
||||
_GLX_PUBLIC void
|
||||
glXDestroyPixmap(Display * dpy, GLXPixmap pixmap)
|
||||
{
|
||||
WARN_ONCE_GLX_1_3(dpy, __func__);
|
||||
@@ -983,7 +983,7 @@ glXDestroyPixmap(Display * dpy, GLXPixmap pixmap)
|
||||
}
|
||||
|
||||
|
||||
_X_EXPORT void
|
||||
_GLX_PUBLIC void
|
||||
glXDestroyWindow(Display * dpy, GLXWindow win)
|
||||
{
|
||||
WARN_ONCE_GLX_1_3(dpy, __func__);
|
||||
@@ -993,17 +993,17 @@ glXDestroyWindow(Display * dpy, GLXWindow win)
|
||||
}
|
||||
|
||||
#ifndef GLX_USE_APPLEGL
|
||||
_X_EXPORT
|
||||
_GLX_PUBLIC
|
||||
GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX,
|
||||
(Display * dpy, GLXPbufferSGIX pbuf),
|
||||
(dpy, pbuf), glXDestroyPbuffer)
|
||||
|
||||
_X_EXPORT
|
||||
_GLX_PUBLIC
|
||||
GLX_ALIAS_VOID(glXSelectEventSGIX,
|
||||
(Display * dpy, GLXDrawable drawable,
|
||||
unsigned long mask), (dpy, drawable, mask), glXSelectEvent)
|
||||
|
||||
_X_EXPORT
|
||||
_GLX_PUBLIC
|
||||
GLX_ALIAS_VOID(glXGetSelectedEventSGIX,
|
||||
(Display * dpy, GLXDrawable drawable,
|
||||
unsigned long *mask), (dpy, drawable, mask),
|
||||
|
Reference in New Issue
Block a user