implement Fake_glXCreateWindow() to fix bug #890894
authorBrian Paul <brian.paul@tungstengraphics.com>
Sun, 8 Feb 2004 00:11:14 +0000 (00:11 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sun, 8 Feb 2004 00:11:14 +0000 (00:11 +0000)
src/mesa/drivers/x11/fakeglx.c

index d8c1a7c1b434a01c153c70dc8fc68e8f9b017c1b..a616915f1d9c5cb5c2fc21f0eb576721f9226928 100644 (file)
@@ -1959,9 +1959,16 @@ static GLXWindow
 Fake_glXCreateWindow( Display *dpy, GLXFBConfig config, Window win,
                       const int *attribList )
 {
+   XMesaVisual xmvis = (XMesaVisual) config;
+   XMesaBuffer xmbuf;
+   if (!xmvis)
+      return 0;
+
+   xmbuf = XMesaCreateWindowBuffer2(xmvis, win, NULL);
+   if (!xmbuf)
+      return 0;
+
    (void) dpy;
-   (void) config;
-   (void) win;
    (void) attribList;  /* Ignored in GLX 1.3 */
 
    return win;  /* A hack for now */