diff options
-rw-r--r-- | src/mesa/drivers/x11/fakeglx.c | 23 | ||||
-rw-r--r-- | src/mesa/drivers/x11/glxapi.c | 107 | ||||
-rw-r--r-- | src/mesa/drivers/x11/glxapi.h | 28 |
3 files changed, 147 insertions, 11 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index dfd9bafdf41..bfb4dc164bc 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -1,4 +1,4 @@ -/* $Id: fakeglx.c,v 1.40 2000/11/22 07:32:17 joukj Exp $ */ +/* $Id: fakeglx.c,v 1.41 2000/12/14 17:44:08 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1798,8 +1798,8 @@ Fake_glXReleaseBuffersMESA( Display *dpy, GLXDrawable d ) #ifdef GLX_MESA_set_3dfx_mode -static GLboolean -Fake_glXSet3DfxModeMESA( GLint mode ) +static Bool +Fake_glXSet3DfxModeMESA( int mode ) { return XMesaSetFXmode( mode ); } @@ -1899,6 +1899,23 @@ struct _glxapi_table *_mesa_GetGLXDispatchTable(void) 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; +#endif + +#ifdef GLX_SGIX_fbconfig + glx.GetFBConfigAttribSGIX = NULL; + glx.ChooseFBConfigSGIX = NULL; + glx.CreateGLXPixmapWithConfigSGIX = NULL; + glx.CreateContextWithConfigSGIX = NULL; + glx.GetVisualFromFBConfigSGIX = NULL; + glx.GetFBConfigFromVisualSGIX = NULL; +#endif + #ifdef GLX_MESA_copy_sub_buffer glx.CopySubBufferMESA = Fake_glXCopySubBufferMESA; #endif diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c index 1a3c9193bc4..fd026b9f621 100644 --- a/src/mesa/drivers/x11/glxapi.c +++ b/src/mesa/drivers/x11/glxapi.c @@ -1,8 +1,8 @@ -/* $Id: glxapi.c,v 1.18 2000/11/19 23:42:33 jtaylor Exp $ */ +/* $Id: glxapi.c,v 1.19 2000/12/14 17:44:08 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.3 + * Version: 3.5 * * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. * @@ -588,6 +588,107 @@ int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count) #endif +#ifdef GLX_SGIX_video_resize + +int glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window) +{ + struct _glxapi_table *t = get_dispatch(CurrentDisplay); + if (!t) + return 0; + return (t->BindChannelToWindowSGIX)(dpy, screen, channel, window); +} + +int glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h) +{ + struct _glxapi_table *t = get_dispatch(CurrentDisplay); + if (!t) + return 0; + 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) +{ + struct _glxapi_table *t = get_dispatch(CurrentDisplay); + if (!t) + return 0; + 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) +{ + struct _glxapi_table *t = get_dispatch(CurrentDisplay); + if (!t) + return 0; + return (t->QueryChannelDeltasSGIX)(dpy, screen, channel, dx, dy, dw, dh); +} + +int glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype) +{ + struct _glxapi_table *t = get_dispatch(CurrentDisplay); + if (!t) + return 0; + return (t->ChannelRectSyncSGIX)(dpy, screen, channel, synctype); +} + +#endif + + +#ifdef GLX_SGIX_fbconfig + +int glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value) +{ + struct _glxapi_table *t = get_dispatch(CurrentDisplay); + if (!t) + return 0; + return (t->GetFBConfigAttribSGIX)(dpy, config, attribute, value); +} + +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); +} + + +GLXPixmap glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap) +{ + struct _glxapi_table *t = get_dispatch(CurrentDisplay); + if (!t) + return 0; + 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(CurrentDisplay); + 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(CurrentDisplay); + if (!t) + return 0; + return (t->GetVisualFromFBConfigSGIX)(dpy, config); +} + +GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis) +{ + struct _glxapi_table *t = get_dispatch(CurrentDisplay); + if (!t) + return 0; + return (t->GetFBConfigFromVisualSGIX)(dpy, vis); +} + +#endif + + + #ifdef GLX_MESA_copy_sub_buffer void glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable, int x, int y, int width, int height) @@ -629,7 +730,7 @@ GLXPixmap glXCreateGLXPixmapMESA(Display *dpy, XVisualInfo *visinfo, Pixmap pixm #ifdef GLX_MESA_set_3dfx_mode -GLboolean glXSet3DfxModeMESA(GLint mode) +Bool glXSet3DfxModeMESA(int mode) { struct _glxapi_table *t = get_dispatch(CurrentDisplay); if (!t) diff --git a/src/mesa/drivers/x11/glxapi.h b/src/mesa/drivers/x11/glxapi.h index 8116c49b9c7..63104b97f92 100644 --- a/src/mesa/drivers/x11/glxapi.h +++ b/src/mesa/drivers/x11/glxapi.h @@ -1,8 +1,8 @@ -/* $Id: glxapi.h,v 1.6 2000/06/08 22:50:28 brianp Exp $ */ +/* $Id: glxapi.h,v 1.7 2000/12/14 17:44:08 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.3 + * Version: 3.5 * * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. * @@ -29,8 +29,7 @@ #define _glxapi_h_ -#define GLX_GLXEXT_LEGACY -#define GL_GLEXT_PROTOTYPES +#define GLX_GLXEXT_PROTOTYPES #include "GL/glx.h" @@ -106,6 +105,25 @@ struct _glxapi_table { int (*WaitVideoSyncSGI)(int divisor, int remainder, unsigned int *count); #endif +#ifdef GLX_SGIX_video_resize + int (*BindChannelToWindowSGIX)(Display *, int, int, Window); + int (*ChannelRectSGIX)(Display *, int, int, int, int, int, int); + int (*QueryChannelRectSGIX)(Display *, int, int, int *, int *, int *, int *); + int (*QueryChannelDeltasSGIX)(Display *, int, int, int *, int *, int *, int *); + 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 *); +#endif + + /* XXX more glx extensions to add here */ + /* * XXX thesa Mesa-specific functions might not belong here */ @@ -123,7 +141,7 @@ struct _glxapi_table { #endif #ifdef GLX_MESA_set_3dfx_mode - GLboolean (*Set3DfxModeMESA)(GLint mode); + Bool (*Set3DfxModeMESA)(int mode); #endif }; |