diff options
author | George Sapountzis <[email protected]> | 2007-04-20 17:51:55 +0300 |
---|---|---|
committer | George Sapountzis <[email protected]> | 2007-04-20 21:08:55 +0300 |
commit | 6aa5668871e7f366b33e85fabc72885fc269a7d4 (patch) | |
tree | 34126e846c2a950d9bdd877c9a52a48a78d5d586 /src/mesa/drivers/x11/xm_api.c | |
parent | d60009bd6dba15d094b0d0bcb8180b7a2e1c1708 (diff) |
xmesa: spilt FX code to separate functions.
Diffstat (limited to 'src/mesa/drivers/x11/xm_api.c')
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 6439d13fa5f..3e65ebd99b5 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1578,25 +1578,20 @@ 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; XMesaColormap cmap; 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 |