Merge remote branch 'origin/gallium-0.2' into gallium-0.2
[mesa.git] / src / glx / x11 / drisw_glx.c
index f7ff0011216e982df9f94d7a4add8c1ba326963f..7bb4794f30cffef013abd749c5886cf58154bfc8 100644 (file)
@@ -24,7 +24,6 @@
 #ifdef GLX_DIRECT_RENDERING
 
 #include <X11/Xlib.h>
-#include "glheader.h"
 #include "glxclient.h"
 #include "glcontextmodes.h"
 #include <dlfcn.h>
@@ -335,6 +334,11 @@ static __GLXDRIdrawable *driCreateDrawable(__GLXscreenConfigs *psc,
     return pdraw;
 }
 
+static void driSwapBuffers(__GLXDRIdrawable *pdraw)
+{
+    (*pdraw->psc->core->swapBuffers)(pdraw->driDrawable);
+}
+
 static void driDestroyScreen(__GLXscreenConfigs *psc)
 {
     /* Free the direct rendering per screen data */
@@ -390,7 +394,7 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
        goto handle_error;
     }
 
-    driBindExtensions(psc);
+    driBindExtensions(psc, 0);
 
     psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
     psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
@@ -398,6 +402,7 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
     psp->destroyScreen = driDestroyScreen;
     psp->createContext = driCreateContext;
     psp->createDrawable = driCreateDrawable;
+    psp->swapBuffers = driSwapBuffers;
 
     return psp;