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/xm_api.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'src/mesa/drivers/x11/xm_api.c') diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 6439d13fa5..3e65ebd99b 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1578,17 +1578,13 @@ void XMesaDestroyContext( XMesaContext c ) * X window or pixmap. * \param v the window's XMesaVisual * \param w the window we're wrapping - * \param c context used to initialize the buffer if 3Dfx mode in use. * \return new XMesaBuffer or NULL if error */ -XMesaBuffer -XMesaCreateWindowBuffer2(XMesaVisual v, XMesaWindow w, XMesaContext c) +PUBLIC XMesaBuffer +XMesaCreateWindowBuffer(XMesaVisual v, XMesaWindow w) { #ifndef XFree86Server XWindowAttributes attr; -#endif -#ifdef FX - char *fxEnvVar; #endif int client = 0; XMesaBuffer b; @@ -1596,7 +1592,6 @@ XMesaCreateWindowBuffer2(XMesaVisual v, XMesaWindow w, XMesaContext c) assert(v); assert(w); - (void) c; /* Check that window depth matches visual depth */ #ifdef XFree86Server @@ -1642,8 +1637,14 @@ XMesaCreateWindowBuffer2(XMesaVisual v, XMesaWindow w, XMesaContext c) return NULL; } + return b; +} + #ifdef FX - fxEnvVar = _mesa_getenv("MESA_GLX_FX"); +void +FXcreateContext(XMesaVisual v, XMesaWindow w, XMesaContext c, XMesaBuffer b) +{ + char *fxEnvVar = _mesa_getenv("MESA_GLX_FX"); if (fxEnvVar) { if (fxEnvVar[0]!='d') { int attribs[100]; @@ -1719,17 +1720,8 @@ XMesaCreateWindowBuffer2(XMesaVisual v, XMesaWindow w, XMesaContext c) _mesa_warning(NULL, " (check the README.3DFX file for more information).\n\n"); _mesa_warning(NULL, " you can disable this message with a 'export MESA_GLX_FX=disable'.\n"); } -#endif - - return b; -} - - -PUBLIC XMesaBuffer -XMesaCreateWindowBuffer(XMesaVisual v, XMesaWindow w) -{ - return XMesaCreateWindowBuffer2( v, w, NULL ); } +#endif /** @@ -2004,9 +1996,9 @@ GLboolean XMesaCopyContext( XMesaContext xm_src, XMesaContext xm_dst, GLuint mas /* * Switch 3Dfx support hack between window and full-screen mode. */ +#ifdef FX GLboolean XMesaSetFXmode( GLint mode ) { -#ifdef FX const char *fx = _mesa_getenv("MESA_GLX_FX"); if (fx && fx[0] != 'd') { GET_CURRENT_CONTEXT(ctx); @@ -2043,11 +2035,15 @@ GLboolean XMesaSetFXmode( GLint mode ) } } /*fprintf(stderr, "fallthrough\n");*/ + return GL_FALSE; +} #else +GLboolean XMesaSetFXmode( GLint mode ) +{ (void) mode; -#endif return GL_FALSE; } +#endif -- cgit v1.2.3