-/* $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
#ifdef GLX_MESA_set_3dfx_mode
-static GLboolean
-Fake_glXSet3DfxModeMESA( GLint mode )
+static Bool
+Fake_glXSet3DfxModeMESA( int mode )
{
return XMesaSetFXmode( mode );
}
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
-/* $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.
*
#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)
#ifdef GLX_MESA_set_3dfx_mode
-GLboolean glXSet3DfxModeMESA(GLint mode)
+Bool glXSet3DfxModeMESA(int mode)
{
struct _glxapi_table *t = get_dispatch(CurrentDisplay);
if (!t)
-/* $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.
*
#define _glxapi_h_
-#define GLX_GLXEXT_LEGACY
-#define GL_GLEXT_PROTOTYPES
+#define GLX_GLXEXT_PROTOTYPES
#include "GL/glx.h"
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
*/
#endif
#ifdef GLX_MESA_set_3dfx_mode
- GLboolean (*Set3DfxModeMESA)(GLint mode);
+ Bool (*Set3DfxModeMESA)(int mode);
#endif
};