From 9a33a11d714c90162d32781ebbd2c1dfab52cfd1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 13 Jun 2002 04:28:29 +0000 Subject: New _mesa_debug() function to replace fprintf() calls. Some source files updated to call _mesa_debug(), but not finished. Added __GLimports as a parameter to _mesa_create/init_context() and updated drivers accordingly. Fleshed-out more of the __GLimports and __GLexports functionality. Removed run-time config file support (config.c) --- src/mesa/drivers/x11/xm_api.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 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 d155f145b8..46e7454b97 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1,4 +1,4 @@ -/* $Id: xm_api.c,v 1.36 2002/05/27 17:06:59 brianp Exp $ */ +/* $Id: xm_api.c,v 1.37 2002/06/13 04:28:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -69,6 +69,7 @@ #include "context.h" #include "extensions.h" #include "glthread.h" +#include "imports.h" #include "matrix.h" #include "mem.h" #include "mmath.h" @@ -1618,11 +1619,10 @@ void XMesaDestroyVisual( XMesaVisual v ) */ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) { + static GLboolean firstTime = GL_TRUE; XMesaContext c; GLcontext *ctx; - GLboolean direct = GL_TRUE; /* XXXX */ - /* NOT_DONE: should this be GL_FALSE??? */ - static GLboolean firstTime = GL_TRUE; + __GLimports imports; if (firstTime) { _glthread_INIT_MUTEX(_xmesa_lock); @@ -1634,9 +1634,10 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) return NULL; } + _mesa_init_default_imports( &imports, (void *) c ); ctx = c->gl_ctx = _mesa_create_context( &v->mesa_visual, share_list ? share_list->gl_ctx : (GLcontext *) NULL, - (void *) c, direct ); + &imports ); if (!c->gl_ctx) { FREE(c); return NULL; @@ -1672,12 +1673,6 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) */ xmesa_init_pointers( ctx ); - - /* Run the config file - */ - _mesa_read_config_file( ctx ); - - return c; } -- cgit v1.2.3