added some more GLX extension entrypoints (fix GLUT link problems when using glxext.h)
[mesa.git] / src / mesa / drivers / x11 / glxapi.h
index b669cfc08bd3620ed4c61150ff2bc2d17bfc33fe..63104b97f920cb83898316b10f10f915ef0d73bb 100644 (file)
@@ -1,10 +1,10 @@
-/* $Id: glxapi.h,v 1.5 2000/04/10 21:13:19 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  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
 #define _glxapi_h_
 
 
+#define GLX_GLXEXT_PROTOTYPES
 #include "GL/glx.h"
 
 
-#define _GLXAPI_VERSION_1_1  1
-#define _GLXAPI_VERSION_1_2  1
-#define _GLXAPI_VERSION_1_3  1
-
-#define _GLXAPI_EXT_import_context  1
-#define _GLXAPI_SGI_video_sync  1
-#define _GLXAPI_MESA_copy_sub_buffer  1
-#define _GLXAPI_MESA_release_buffers  1
-#define _GLXAPI_MESA_pixmap_colormap  1
-#define _GLXAPI_MESA_set_3dfx_mode  1
-
-
 /*
  * Almost all the GLX API functions get routed through this dispatch table.
  * The exceptions are the glXGetCurrentXXX() functions.
@@ -73,17 +62,17 @@ struct _glxapi_table {
    void (*WaitGL)(void);
    void (*WaitX)(void);
 
-#ifdef _GLXAPI_VERSION_1_1
+#ifdef GLX_VERSION_1_1
    const char *(*GetClientString)(Display *dpy, int name);
    const char *(*QueryExtensionsString)(Display *dpy, int screen);
    const char *(*QueryServerString)(Display *dpy, int screen, int name);
 #endif
 
-#ifdef _GLXAPI_VERSION_1_2
+#ifdef GLX_VERSION_1_2
    /*Display *(*GetCurrentDisplay)(void);*/
 #endif
 
-#ifdef _GLXAPI_VERSION_1_3
+#ifdef GLX_VERSION_1_3
    GLXFBConfig *(*ChooseFBConfig)(Display *dpy, int screen, const int *attribList, int *nitems);
    GLXContext (*CreateNewContext)(Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct);
    GLXPbuffer (*CreatePbuffer)(Display *dpy, GLXFBConfig config, const int *attribList);
@@ -103,7 +92,7 @@ struct _glxapi_table {
    void (*SelectEvent)(Display *dpy, GLXDrawable drawable, unsigned long mask);
 #endif
 
-#ifdef _GLXAPI_EXT_import_context
+#ifdef GLX_EXT_import_context
    void (*FreeContextEXT)(Display *dpy, GLXContext context);
    GLXContextID (*GetContextIDEXT)(const GLXContext context);
    Display *(*GetCurrentDisplayEXT)(void);
@@ -111,29 +100,48 @@ struct _glxapi_table {
    int (*QueryContextInfoEXT)(Display *dpy, GLXContext context, int attribute,int *value);
 #endif
 
-#ifdef _GLXAPI_SGI_video_sync
+#ifdef GLX_SGI_video_sync
    int (*GetVideoSyncSGI)(unsigned int *count);
    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
     */
 
-#ifdef _GLXAPI_MESA_copy_sub_buffer
+#ifdef GLX_MESA_copy_sub_buffer
    void (*CopySubBufferMESA)(Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
 #endif
 
-#ifdef _GLXAPI_MESA_release_buffers
+#ifdef GLX_MESA_release_buffers
    Bool (*ReleaseBuffersMESA)(Display *dpy, Window w);
 #endif
 
-#ifdef _GLXAPI_MESA_pixmap_colormap
+#ifdef GLX_MESA_pixmap_colormap
    GLXPixmap (*CreateGLXPixmapMESA)(Display *dpy, XVisualInfo *visinfo, Pixmap pixmap, Colormap cmap);
 #endif
 
-#ifdef _GLXAPI_MESA_set_3dfx_mode
-   GLboolean (*Set3DfxModeMESA)(GLint mode);
+#ifdef GLX_MESA_set_3dfx_mode
+   Bool (*Set3DfxModeMESA)(int mode);
 #endif
 
 };