summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-12-15 04:02:50 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-12-15 04:02:50 +0000
commit783d7dfcbf40f727c85915b3e5ea5ff6682eaa48 (patch)
tree982ec5bd3a807996e665d6d38c5d166d04840fe0 /src
parent083e466f88e1203f08b7699fa34b05d0e45b3172 (diff)
added more GLX extension function stubs
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/x11/fakeglx.c470
-rw-r--r--src/mesa/drivers/x11/glxapi.c256
-rw-r--r--src/mesa/drivers/x11/glxapi.h70
3 files changed, 702 insertions, 94 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index bfb4dc164b..3b6ff71ab5 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1,4 +1,4 @@
-/* $Id: fakeglx.c,v 1.41 2000/12/14 17:44:08 brianp Exp $ */
+/* $Id: fakeglx.c,v 1.42 2000/12/15 04:02:50 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1778,57 +1778,408 @@ Fake_glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
-#ifdef GLX_MESA_release_buffers
-/*
- * Release the depth, stencil, accum buffers attached to a GLXDrawable
- * (a window or pixmap) prior to destroying the GLXDrawable.
- */
+#ifdef GLX_SGI_swap_control
+
+static int
+Fake_glXSwapIntervalSGI(int interval)
+{
+ (void) interval;
+ return 0;
+}
+
+#endif
+
+
+#ifdef GLX_SGI_video_sync
+
+static int
+Fake_glXGetVideoSyncSGI(unsigned int *count)
+{
+ (void) count;
+ return 0;
+}
+
+static int
+Fake_glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
+{
+ (void) divisor;
+ (void) remainder;
+ (void) count;
+ return 0;
+}
+
+#endif
+
+
+#ifdef GLX_SGI_make_current_read
+
static Bool
-Fake_glXReleaseBuffersMESA( Display *dpy, GLXDrawable d )
+Fake_glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
{
- XMesaBuffer b = XMesaFindBuffer(dpy, d);
- if (b) {
- XMesaDestroyBuffer(b);
- return True;
- }
+ (void) dpy;
+ (void) draw;
+ (void) read;
+ (void) ctx;
return False;
}
+
+static GLXDrawable
+Fake_glXGetCurrentReadDrawableSGI(void)
+{
+ return 0;
+}
+
#endif
+#if defined(_VL_H) && defined(GLX_SGIX_video_source)
-#ifdef GLX_MESA_set_3dfx_mode
-static Bool
-Fake_glXSet3DfxModeMESA( int mode )
+static GLXVideoSourceSGIX
+Fake_glXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode)
{
- return XMesaSetFXmode( mode );
+ (void) dpy;
+ (void) screen;
+ (void) server;
+ (void) path;
+ (void) nodeClass;
+ (void) drainNode;
+ return 0;
+}
+
+static void
+Fake_glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src)
+{
+ (void) dpy;
+ (void) src;
}
+
#endif
+#ifdef GLX_EXT_import_context
-/*
- * GLX_SGI_video_sync
- */
+static void
+Fake_glXFreeContextEXT(Display *dpy, GLXContext context)
+{
+ (void) dpy;
+ (void) context;
+}
-#ifdef GLX_SGI_video_sync
+static GLXContextID
+Fake_glXGetContextIDEXT(const GLXContext context)
+{
+ (void) context;
+ return 0;
+}
+
+static Display *
+Fake_glXGetCurrentDisplayEXT(void)
+{
+ return glXGetCurrentDisplay();
+}
+
+static GLXContext
+Fake_glXImportContextEXT(Display *dpy, GLXContextID contextID)
+{
+ (void) dpy;
+ (void) contextID;
+ return 0;
+}
static int
-Fake_glXGetVideoSyncSGI(unsigned int *count)
+Fake_glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute, int *value)
{
+ (void) dpy;
+ (void) context;
+ (void) attribute;
+ (void) value;
return 0;
}
+#endif
+
+
+#ifdef GLX_SGIX_fbconfig
static int
-Fake_glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
+Fake_glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value)
+{
+ (void) dpy;
+ (void) config;
+ (void) attribute;
+ (void) value;
+ return 0;
+}
+
+static GLXFBConfigSGIX *
+Fake_glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list, int *nelements)
+{
+ (void) dpy;
+ (void) screen;
+ (void) attrib_list;
+ (void) nelements;
+ return 0;
+}
+
+static GLXPixmap
+Fake_glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap)
+{
+ (void) dpy;
+ (void) config;
+ (void) pixmap;
+ return 0;
+}
+
+static GLXContext
+Fake_glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct)
+{
+ (void) dpy;
+ (void) config;
+ (void) render_type;
+ (void) share_list;
+ (void) direct;
+ return 0;
+}
+
+static XVisualInfo *
+Fake_glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config)
+{
+ (void) dpy;
+ (void) config;
+ return NULL;
+}
+
+static GLXFBConfigSGIX
+Fake_glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis)
{
+ (void) dpy;
+ (void) vis;
return 0;
}
#endif
+#ifdef GLX_SGIX_pbuffer
+
+static GLXPbufferSGIX
+Fake_glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list)
+{
+ (void) dpy;
+ (void) config;
+ (void) width;
+ (void) height;
+ (void) attrib_list;
+ return 0;
+}
+
+static void
+Fake_glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf)
+{
+ (void) dpy;
+ (void) pbuf;
+}
+
+static int
+Fake_glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value)
+{
+ (void) dpy;
+ (void) pbuf;
+ (void) attribute;
+ (void) value;
+ return 0;
+}
+
+static void
+Fake_glXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask)
+{
+ (void) dpy;
+ (void) drawable;
+ (void) mask;
+}
+
+static void
+Fake_glXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long *mask)
+{
+ (void) dpy;
+ (void) drawable;
+ (void) mask;
+}
+
+#endif
+
+
+#ifdef GLX_SGI_cushion
+
+static void
+Fake_glXCushionSGI(Display *dpy, Window win, float cushion)
+{
+ (void) dpy;
+ (void) win;
+ (void) cushion;
+}
+
+#endif
+
+
+#ifdef GLX_SGIX_video_resize
+
+static int
+Fake_glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window)
+{
+ (void) dpy;
+ (void) screen;
+ (void) channel;
+ (void) window;
+ return 0;
+}
+
+static int
+Fake_glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h)
+{
+ (void) dpy;
+ (void) screen;
+ (void) channel;
+ (void) x;
+ (void) y;
+ (void) w;
+ (void) h;
+ return 0;
+}
+
+static int
+Fake_glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h)
+{
+ (void) dpy;
+ (void) screen;
+ (void) channel;
+ (void) x;
+ (void) y;
+ (void) w;
+ (void) h;
+ return 0;
+}
+
+static int
+Fake_glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh)
+{
+ (void) dpy;
+ (void) screen;
+ (void) channel;
+ (void) dx;
+ (void) dy;
+ (void) dw;
+ (void) dh;
+ return 0;
+}
+
+static int
+Fake_glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype)
+{
+ (void) dpy;
+ (void) screen;
+ (void) channel;
+ (void) synctype;
+ return 0;
+}
+
+#endif
+
+
+#if defined(_DM_BUFFER_H_) && defined(GLX_SGIX_dmbuffer)
+
+static Bool
+Fake_glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer)
+{
+ (void) dpy;
+ (void) pbuffer;
+ (void) params;
+ (void) dmbuffer;
+ return False;
+}
+
+#endif
+
+
+#ifdef GLX_SGIX_swap_group
+
+static void
+Fake_glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, GLXDrawable member)
+{
+ (void) dpy;
+ (void) drawable;
+ (void) member;
+}
+
+#endif
+
+
+#ifdef GLX_SGIX_swap_barrier
+
+static void
+Fake_glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, int barrier)
+{
+ (void) dpy;
+ (void) drawable;
+ (void) barrier;
+}
+
+static Bool
+Fake_glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max)
+{
+ (void) dpy;
+ (void) screen;
+ (void) max;
+ return False;
+}
+
+#endif
+
+
+#ifdef GLX_SUN_get_transparent_index
+
+static Status
+Fake_glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, long *pTransparent)
+{
+ (void) dpy;
+ (void) overlay;
+ (void) underlay;
+ (void) pTransparent;
+ return 0;
+}
+
+#endif
+
+
+#ifdef GLX_MESA_release_buffers
+/*
+ * Release the depth, stencil, accum buffers attached to a GLXDrawable
+ * (a window or pixmap) prior to destroying the GLXDrawable.
+ */
+static Bool
+Fake_glXReleaseBuffersMESA( Display *dpy, GLXDrawable d )
+{
+ XMesaBuffer b = XMesaFindBuffer(dpy, d);
+ if (b) {
+ XMesaDestroyBuffer(b);
+ return True;
+ }
+ return False;
+}
+#endif
+
+
+
+#ifdef GLX_MESA_set_3dfx_mode
+static Bool
+Fake_glXSet3DfxModeMESA( int mode )
+{
+ return XMesaSetFXmode( mode );
+}
+#endif
+
+
+
extern struct _glxapi_table *_mesa_GetGLXDispatchTable(void);
struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
@@ -1894,26 +2245,77 @@ struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
glx.SelectEvent = Fake_glXSelectEvent;
#endif
+#ifdef GLX_SGI_swap_control
+ glx.SwapIntervalSGI = Fake_glXSwapIntervalSGI;
+#endif
+
#ifdef GLX_SGI_video_sync
glx.GetVideoSyncSGI = Fake_glXGetVideoSyncSGI;
glx.WaitVideoSyncSGI = Fake_glXWaitVideoSyncSGI;
#endif
-#ifdef GLX_SGIX_video_resize
- glx.BindChannelToWindowSGIX = NULL;
- glx.ChannelRectSGIX = NULL;
- glx.QueryChannelRectSGIX = NULL;
- glx.QueryChannelDeltasSGIX = NULL;
- glx.ChannelRectSyncSGIX = NULL;
+#ifdef GLX_SGI_make_current_read
+ glx.MakeCurrentReadSGI = Fake_glXMakeCurrentReadSGI;
+ glx.GetCurrentReadDrawableSGI = Fake_glXGetCurrentReadDrawableSGI;
+#endif
+
+#if defined(_VL_H) && defined(GLX_SGIX_video_source)
+ glx.CreateGLXVideoSourceSGIX = Fake_glXCreateGLXVideoSourceSGIX;
+ glx.DestroyGLXVideoSourceSGIX = Fake_glXDestroyGLXVideoSourceSGIX;
+#endif
+
+#ifdef GLX_EXT_import_context
+ glx.FreeContextEXT = Fake_glXFreeContextEXT;
+ glx.GetContextIDEXT = Fake_glXGetContextIDEXT;
+ glx.GetCurrentDisplayEXT = Fake_glXGetCurrentDisplayEXT;
+ glx.ImportContextEXT = Fake_glXImportContextEXT;
+ glx.QueryContextInfoEXT = Fake_glXQueryContextInfoEXT;
#endif
#ifdef GLX_SGIX_fbconfig
- glx.GetFBConfigAttribSGIX = NULL;
- glx.ChooseFBConfigSGIX = NULL;
- glx.CreateGLXPixmapWithConfigSGIX = NULL;
- glx.CreateContextWithConfigSGIX = NULL;
- glx.GetVisualFromFBConfigSGIX = NULL;
- glx.GetFBConfigFromVisualSGIX = NULL;
+ glx.GetFBConfigAttribSGIX = Fake_glXGetFBConfigAttribSGIX;
+ glx.ChooseFBConfigSGIX = Fake_glXChooseFBConfigSGIX;
+ glx.CreateGLXPixmapWithConfigSGIX = Fake_glXCreateGLXPixmapWithConfigSGIX;
+ glx.CreateContextWithConfigSGIX = Fake_glXCreateContextWithConfigSGIX;
+ glx.GetVisualFromFBConfigSGIX = Fake_glXGetVisualFromFBConfigSGIX;
+ glx.GetFBConfigFromVisualSGIX = Fake_glXGetFBConfigFromVisualSGIX;
+#endif
+
+#ifdef GLX_SGIX_pbuffer
+ glx.CreateGLXPbufferSGIX = Fake_glXCreateGLXPbufferSGIX;
+ glx.DestroyGLXPbufferSGIX = Fake_glXDestroyGLXPbufferSGIX;
+ glx.QueryGLXPbufferSGIX = Fake_glXQueryGLXPbufferSGIX;
+ glx.SelectEventSGIX = Fake_glXSelectEventSGIX;
+ glx.GetSelectedEventSGIX = Fake_glXGetSelectedEventSGIX;
+#endif
+
+#ifdef GLX_SGI_cushion
+ glx.CushionSGI = Fake_glXCushionSGI;
+#endif
+
+#ifdef GLX_SGIX_video_resize
+ glx.BindChannelToWindowSGIX = Fake_glXBindChannelToWindowSGIX;
+ glx.ChannelRectSGIX = Fake_glXChannelRectSGIX;
+ glx.QueryChannelRectSGIX = Fake_glXQueryChannelRectSGIX;
+ glx.QueryChannelDeltasSGIX = Fake_glXQueryChannelDeltasSGIX;
+ glx.ChannelRectSyncSGIX = Fake_glXChannelRectSyncSGIX;
+#endif
+
+#if defined(_DM_BUFFER_H_) && defined(GLX_SGIX_dmbuffer)
+ glx.AssociateDMPbufferSGIX = NULL;
+#endif
+
+#ifdef GLX_SGIX_swap_group
+ glx.JoinSwapGroupSGIX = Fake_glXJoinSwapGroupSGIX;
+#endif
+
+#ifdef GLX_SGIX_swap_barrier
+ glx.BindSwapBarrierSGIX = Fake_glXBindSwapBarrierSGIX;
+ glx.QueryMaxSwapBarriersSGIX = Fake_glXQueryMaxSwapBarriersSGIX;
+#endif
+
+#ifdef GLX_SUN_get_transparent_index
+ glx.GetTransparentIndexSUN = Fake_glXGetTransparentIndexSUN;
#endif
#ifdef GLX_MESA_copy_sub_buffer
diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c
index fd026b9f62..a24450dab4 100644
--- a/src/mesa/drivers/x11/glxapi.c
+++ b/src/mesa/drivers/x11/glxapi.c
@@ -1,4 +1,4 @@
-/* $Id: glxapi.c,v 1.19 2000/12/14 17:44:08 brianp Exp $ */
+/* $Id: glxapi.c,v 1.20 2000/12/15 04:02:50 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -520,6 +520,82 @@ void glXSelectEvent(Display *dpy, GLXDrawable drawable, unsigned long mask)
#endif /* GLX_VERSION_1_3 */
+#ifdef GLX_SGI_swap_control
+
+int glXSwapIntervalSGI(int interval)
+{
+ struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ if (!t)
+ return 0;
+ return (t->SwapIntervalSGI)(interval);
+}
+
+#endif
+
+
+#ifdef GLX_SGI_video_sync
+
+int glXGetVideoSyncSGI(unsigned int *count)
+{
+ struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ if (!t)
+ return 0;
+ return (t->GetVideoSyncSGI)(count);
+}
+
+int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
+{
+ struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ if (!t)
+ return 0;
+ return (t->WaitVideoSyncSGI)(divisor, remainder, count);
+}
+
+#endif
+
+
+#ifdef GLX_SGI_make_current_read
+
+Bool glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return 0;
+ return (t->MakeCurrentReadSGI)(dpy, draw, read, ctx);
+}
+
+GLXDrawable glXGetCurrentReadDrawableSGI(void)
+{
+ struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ if (!t)
+ return 0;
+ return (t->GetCurrentReadDrawableSGI)();
+}
+
+#endif
+
+
+#if defined(_VL_H) && defined(GLX_SGIX_video_source)
+
+GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return 0;
+ return (t->CreateGLXVideoSourceSGIX)(dpy, screen, server, path, nodeClass, drainNode);
+}
+
+void glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return 0;
+ return (t->DestroyGLXVideoSourceSGIX)(dpy, src);
+}
+
+#endif
+
+
#ifdef GLX_EXT_import_context
void glXFreeContextEXT(Display *dpy, GLXContext context)
@@ -530,7 +606,6 @@ void glXFreeContextEXT(Display *dpy, GLXContext context)
(t->FreeContextEXT)(dpy, context);
}
-
GLXContextID glXGetContextIDEXT(const GLXContext context)
{
/* XXX is this function right? */
@@ -540,13 +615,11 @@ GLXContextID glXGetContextIDEXT(const GLXContext context)
return (t->GetContextIDEXT)(context);
}
-
Display *glXGetCurrentDisplayEXT(void)
{
return CurrentDisplay;
}
-
GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID)
{
struct _glxapi_table *t = get_dispatch(dpy);
@@ -566,23 +639,112 @@ int glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute,int *
#endif
-#ifdef GLX_SGI_video_sync
+#ifdef GLX_SGIX_fbconfig
-int glXGetVideoSyncSGI(unsigned int *count)
+int glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
return 0;
- return (t->GetVideoSyncSGI)(count);
+ return (t->GetFBConfigAttribSGIX)(dpy, config, attribute, value);
}
+GLXFBConfigSGIX *glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list, int *nelements)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return 0;
+ return (t->ChooseFBConfigSGIX)(dpy, screen, attrib_list, nelements);
+}
-int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
+GLXPixmap glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
return 0;
- return (t->WaitVideoSyncSGI)(divisor, remainder, count);
+ return (t->CreateGLXPixmapWithConfigSGIX)(dpy, config, pixmap);
+}
+
+GLXContext glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return 0;
+ return (t->CreateContextWithConfigSGIX)(dpy, config, render_type, share_list, direct);
+}
+
+XVisualInfo * glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return 0;
+ return (t->GetVisualFromFBConfigSGIX)(dpy, config);
+}
+
+GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return 0;
+ return (t->GetFBConfigFromVisualSGIX)(dpy, vis);
+}
+
+#endif
+
+
+#ifdef GLX_SGIX_pbuffer
+
+GLXPbufferSGIX glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return 0;
+ return (t->CreateGLXPbufferSGIX)(dpy, config, width, height, attrib_list);
+}
+
+void glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return;
+ (t->DestroyGLXPbufferSGIX)(dpy, pbuf);
+}
+
+int glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return 0;
+ return (t->QueryGLXPbufferSGIX)(dpy, pbuf, attribute, value);
+}
+
+void glXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return;
+ (t->SelectEventSGIX)(dpy, drawable, mask);
+}
+
+void glXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long *mask)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return;
+ (t->GetSelectedEventSGIX)(dpy, drawable, mask);
+}
+
+#endif
+
+
+#ifdef GLX_SGI_cushion
+
+void glXCushionSGI(Display *dpy, Window win, float cushion)
+{
+ struct _glxapi_table *t = get_dispatch(dpy);
+ if (!t)
+ return;
+ (t->CushionSGI)(dpy, win, cushion);
}
#endif
@@ -592,7 +754,7 @@ int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
int glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
return 0;
return (t->BindChannelToWindowSGIX)(dpy, screen, channel, window);
@@ -600,7 +762,7 @@ int glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window wi
int glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
return 0;
return (t->ChannelRectSGIX)(dpy, screen, channel, x, y, w, h);
@@ -608,7 +770,7 @@ int glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int
int glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
return 0;
return (t->QueryChannelRectSGIX)(dpy, screen, channel, x, y, w, h);
@@ -616,7 +778,7 @@ int glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *
int glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
return 0;
return (t->QueryChannelDeltasSGIX)(dpy, screen, channel, dx, dy, dw, dh);
@@ -624,7 +786,7 @@ int glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, in
int glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
return 0;
return (t->ChannelRectSyncSGIX)(dpy, screen, channel, synctype);
@@ -633,62 +795,66 @@ int glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctyp
#endif
-#ifdef GLX_SGIX_fbconfig
+#if defined(_DM_BUFFER_H_) && defined(GLX_SGIX_dmbuffer)
-int glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value)
+Bool glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
- return 0;
- return (t->GetFBConfigAttribSGIX)(dpy, config, attribute, value);
+ return False;
+ return (t->AssociateDMPbufferSGIX)(dpy, pbuffer, params, dmbuffer);
}
-GLXFBConfigSGIX * glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list, int *nelements)
-{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
- if (!t)
- return 0;
- return (t->ChooseFBConfigSGIX)(dpy, screen, attrib_list, nelements);
-}
+#endif
-GLXPixmap glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap)
+#ifdef GLX_SGIX_swap_group
+
+void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, GLXDrawable member)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
- return 0;
- return (t->CreateGLXPixmapWithConfigSGIX)(dpy, config, pixmap);
+ return;
+ (*t->JoinSwapGroupSGIX)(dpy, drawable, member);
}
+#endif
-GLXContext glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct)
+
+#ifdef GLX_SGIX_swap_barrier
+
+void glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, int barrier)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
- return 0;
- return (t->CreateContextWithConfigSGIX)(dpy, config, render_type, share_list, direct);
+ return;
+ (*t->BindSwapBarrierSGIX)(dpy, drawable, barrier);
}
-XVisualInfo * glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config)
+Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
- return 0;
- return (t->GetVisualFromFBConfigSGIX)(dpy, config);
+ return False;
+ return (*t->QueryMaxSwapBarriersSGIX)(dpy, screen, max);
}
-GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis)
+#endif
+
+
+#ifdef GLX_SUN_get_transparent_index
+
+Status glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, long *pTransparent)
{
- struct _glxapi_table *t = get_dispatch(CurrentDisplay);
+ struct _glxapi_table *t = get_dispatch(dpy);
if (!t)
- return 0;
- return (t->GetFBConfigFromVisualSGIX)(dpy, vis);
+ return False;
+ return (*t->GetTransparentIndexSUN)(dpy, overlay, underlay, pTransparent);
}
#endif
-
#ifdef GLX_MESA_copy_sub_buffer
void glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable, int x, int y, int width, int height)
diff --git a/src/mesa/drivers/x11/glxapi.h b/src/mesa/drivers/x11/glxapi.h
index 63104b97f9..d24b74bcbd 100644
--- a/src/mesa/drivers/x11/glxapi.h
+++ b/src/mesa/drivers/x11/glxapi.h
@@ -1,4 +1,4 @@
-/* $Id: glxapi.h,v 1.7 2000/12/14 17:44:08 brianp Exp $ */
+/* $Id: glxapi.h,v 1.8 2000/12/15 04:02:50 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -41,6 +41,9 @@
* Specifically, a real GLX library (like SGI's or the Utah GLX) and Mesa's
* pseudo-GLX can be present at the same time. The former being used on
* GLX-enabled X servers and the later on non-GLX X servers.
+ *
+ * XXX Note that this hasn't actually been fully used yet in either Mesa or
+ * the DRI. Red Hat, however, has used it for their custom libGL.
*/
struct _glxapi_table {
/* GLX 1.0 functions */
@@ -92,6 +95,25 @@ struct _glxapi_table {
void (*SelectEvent)(Display *dpy, GLXDrawable drawable, unsigned long mask);
#endif
+#ifdef GLX_SGI_swap_control
+ int (*SwapIntervalSGI)(int);
+#endif
+
+#ifdef GLX_SGI_video_sync
+ int (*GetVideoSyncSGI)(unsigned int *count);
+ int (*WaitVideoSyncSGI)(int divisor, int remainder, unsigned int *count);
+#endif
+
+#ifdef GLX_SGI_make_current_read
+ Bool (*MakeCurrentReadSGI)(Display *, GLXDrawable, GLXDrawable, GLXContext);
+ GLXDrawable (*GetCurrentReadDrawableSGI)(void);
+#endif
+
+#if defined(_VL_H) && defined(GLX_SGIX_video_source)
+ GLXVideoSourceSGIX (*CreateGLXVideoSourceSGIX)(Display *, int, VLServer, VLPath, int, VLNode);
+ void (*DestroyGLXVideoSourceSGIX)(Display *, GLXVideoSourceSGIX);
+#endif
+
#ifdef GLX_EXT_import_context
void (*FreeContextEXT)(Display *dpy, GLXContext context);
GLXContextID (*GetContextIDEXT)(const GLXContext context);
@@ -100,9 +122,25 @@ struct _glxapi_table {
int (*QueryContextInfoEXT)(Display *dpy, GLXContext context, int attribute,int *value);
#endif
-#ifdef GLX_SGI_video_sync
- int (*GetVideoSyncSGI)(unsigned int *count);
- int (*WaitVideoSyncSGI)(int divisor, int remainder, unsigned int *count);
+#ifdef GLX_SGIX_fbconfig
+ int (*GetFBConfigAttribSGIX)(Display *, GLXFBConfigSGIX, int, int *);
+ GLXFBConfigSGIX * (*ChooseFBConfigSGIX)(Display *, int, int *, int *);
+ GLXPixmap (*CreateGLXPixmapWithConfigSGIX)(Display *, GLXFBConfigSGIX, Pixmap);
+ GLXContext (*CreateContextWithConfigSGIX)(Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
+ XVisualInfo * (*GetVisualFromFBConfigSGIX)(Display *, GLXFBConfigSGIX);
+ GLXFBConfigSGIX (*GetFBConfigFromVisualSGIX)(Display *, XVisualInfo *);
+#endif
+
+#ifdef GLX_SGIX_pbuffer
+ GLXPbufferSGIX (*CreateGLXPbufferSGIX)(Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
+ void (*DestroyGLXPbufferSGIX)(Display *, GLXPbufferSGIX);
+ int (*QueryGLXPbufferSGIX)(Display *, GLXPbufferSGIX, int, unsigned int *);
+ void (*SelectEventSGIX)(Display *, GLXDrawable, unsigned long);
+ void (*GetSelectedEventSGIX)(Display *, GLXDrawable, unsigned long *);
+#endif
+
+#ifdef GLX_SGI_cushion
+ void (*CushionSGI)(Display *, Window, float);
#endif
#ifdef GLX_SGIX_video_resize
@@ -113,20 +151,22 @@ struct _glxapi_table {
int (*ChannelRectSyncSGIX)(Display *, int, int, GLenum);
#endif
-#ifdef GLX_SGIX_fbconfig
- int (*GetFBConfigAttribSGIX)(Display *, GLXFBConfigSGIX, int, int *);
- GLXFBConfigSGIX * (*ChooseFBConfigSGIX)(Display *, int, int *, int *);
- GLXPixmap (*CreateGLXPixmapWithConfigSGIX)(Display *, GLXFBConfigSGIX, Pixmap);
- GLXContext (*CreateContextWithConfigSGIX)(Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
- XVisualInfo * (*GetVisualFromFBConfigSGIX)(Display *, GLXFBConfigSGIX);
- GLXFBConfigSGIX (*GetFBConfigFromVisualSGIX)(Display *, XVisualInfo *);
+#if defined (_DM_BUFFER_H_) && defined(GLX_SGIX_dmbuffer)
+ Bool (*AssociateDMPbufferSGIX)(Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
#endif
- /* XXX more glx extensions to add here */
+#ifdef GLX_SGIX_swap_group
+ void (*JoinSwapGroupSGIX)(Display *, GLXDrawable, GLXDrawable);
+#endif
+
+#ifdef GLX_SGIX_swap_barrier
+ void (*BindSwapBarrierSGIX)(Display *, GLXDrawable, int);
+ Bool (*QueryMaxSwapBarriersSGIX)(Display *, int, int *);
+#endif
- /*
- * XXX thesa Mesa-specific functions might not belong here
- */
+#ifdef GLX_SUN_get_transparent_index
+ Status (*GetTransparentIndexSUN)(Display *, Window, Window, long *);
+#endif
#ifdef GLX_MESA_copy_sub_buffer
void (*CopySubBufferMESA)(Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);