DRI2: Drop sarea, implement swap buffers in the X server.
[mesa.git] / src / glx / x11 / glxclient.h
index d19cc04d07797c18fb8b19863ac255e50c4d00cd..412511247efa4c89365c06dddf230da9f9b007cf 100644 (file)
@@ -66,6 +66,8 @@
 # include <pthread.h>
 #endif
 
+#include "glxextensions.h"
+
 #define GLX_MAJOR_VERSION      1       /* current version numbers */
 #define GLX_MINOR_VERSION      4
 
@@ -121,6 +123,8 @@ struct __GLXDRIscreenRec {
                                        XID drawable,
                                        GLXDrawable glxDrawable,
                                        const __GLcontextModes *modes);
+
+    void (*swapBuffers)(__GLXDRIdrawable *pdraw);
 };
 
 struct __GLXDRIcontextRec {
@@ -139,14 +143,15 @@ struct __GLXDRIdrawableRec {
     XID xDrawable;
     XID drawable;
     __GLXscreenConfigs *psc;
-    __DRIdrawable *driDrawable;
     GLenum textureTarget;
+    __DRIdrawable *driDrawable;
 };
 
 /*
 ** Function to create and DRI display data and initialize the display
 ** dependent methods.
 */
+extern __GLXDRIdisplay *driswCreateDisplay(Display *dpy);
 extern __GLXDRIdisplay *driCreateDisplay(Display *dpy);
 extern __GLXDRIdisplay *dri2CreateDisplay(Display *dpy);
 
@@ -465,6 +470,8 @@ struct __GLXscreenConfigsRec {
     __DRIscreen *__driScreen;
     const __DRIcoreExtension *core;
     const __DRIlegacyExtension *legacy;
+    const __DRIswrastExtension *swrast;
+    const __DRIdri2Extension *dri2;
     __glxHashTable *drawHash;
     Display *dpy;
     int scr, fd;
@@ -564,6 +571,7 @@ struct __GLXdisplayPrivateRec {
     /**
      * Per display direct rendering interface functions and data.
      */
+    __GLXDRIdisplay *driswDisplay;
     __GLXDRIdisplay *driDisplay;
     __GLXDRIdisplay *dri2Display;
 #endif
@@ -690,9 +698,10 @@ extern void __glEmptyImage(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum,
 
 
 /*
-** Allocate and Initialize Vertex Array client state 
+** Allocate and Initialize Vertex Array client state, and free.
 */
-extern void __glXInitVertexArrayState(__GLXcontext*);
+extern void __glXInitVertexArrayState(__GLXcontext *);
+extern void __glXFreeVertexArrayState(__GLXcontext *);
 
 /*
 ** Inform the Server of the major and minor numbers and of the client