From 6aa5668871e7f366b33e85fabc72885fc269a7d4 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Fri, 20 Apr 2007 17:51:55 +0300 Subject: xmesa: spilt FX code to separate functions. --- src/mesa/drivers/x11/fakeglx.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/mesa/drivers/x11/fakeglx.c') diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index eecd52aa32..86a4deabc6 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -1440,11 +1440,14 @@ Fake_glXMakeContextCurrent( Display *dpy, GLXDrawable draw, } if (!drawBuffer) { /* drawable must be a new window! */ - drawBuffer = XMesaCreateWindowBuffer2( xmctx->xm_visual, draw, xmctx); + drawBuffer = XMesaCreateWindowBuffer( xmctx->xm_visual, draw ); if (!drawBuffer) { /* Out of memory, or context/drawable depth mismatch */ return False; } +#ifdef FX + FXcreateContext( xmctx->xm_visual, draw, xmctx, drawBuffer ); +#endif } /* Find the XMesaBuffer which corresponds to the GLXDrawable 'read' */ @@ -1457,12 +1460,14 @@ Fake_glXMakeContextCurrent( Display *dpy, GLXDrawable draw, } if (!readBuffer) { /* drawable must be a new window! */ - readBuffer = XMesaCreateWindowBuffer2(glxCtx->xmesaContext->xm_visual, - read, xmctx); + readBuffer = XMesaCreateWindowBuffer( xmctx->xm_visual, read ); if (!readBuffer) { /* Out of memory, or context/drawable depth mismatch */ return False; } +#ifdef FX + FXcreateContext( xmctx->xm_visual, read, xmctx, readBuffer ); +#endif } MakeCurrent_PrevContext = ctx; @@ -2107,10 +2112,15 @@ Fake_glXCreateWindow( Display *dpy, GLXFBConfig config, Window win, if (!xmvis) return 0; - xmbuf = XMesaCreateWindowBuffer2(xmvis, win, NULL); + xmbuf = XMesaCreateWindowBuffer(xmvis, win); if (!xmbuf) return 0; +#ifdef FX + /* XXX this will segfault if actually called */ + FXcreateContext(xmvis, win, NULL, xmbuf); +#endif + (void) dpy; (void) attribList; /* Ignored in GLX 1.3 */ -- cgit v1.2.3