added some more GLX extension entrypoints (fix GLUT link problems when using glxext.h)
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 14 Dec 2000 17:44:08 +0000 (17:44 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 14 Dec 2000 17:44:08 +0000 (17:44 +0000)
src/mesa/drivers/x11/fakeglx.c
src/mesa/drivers/x11/glxapi.c
src/mesa/drivers/x11/glxapi.h

index dfd9baf..bfb4dc1 100644 (file)
@@ -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
index 1a3c919..fd026b9 100644 (file)
@@ -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)
index 8116c49..63104b9 100644 (file)
@@ -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
 
 };