From 5a9026c65d260dc185e072163999f5d810015108 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 17 Nov 2000 21:01:25 +0000 Subject: Minor header file changes to silence warnings. Added _mesa_enable_sw_extensions(), called by software-only drivers to enable all s/w-supported GL extensions. --- src/mesa/drivers/beos/GLView.cpp | 10 +++++++++- src/mesa/drivers/ggi/ggimesa.c | 3 +++ src/mesa/drivers/glide/fxdd.c | 21 --------------------- src/mesa/drivers/osmesa/osmesa.c | 8 ++++---- src/mesa/drivers/svga/svgamesa.c | 7 +++++-- src/mesa/drivers/windows/wmesa.c | 4 +++- src/mesa/drivers/x11/xm_api.c | 6 ++---- 7 files changed, 26 insertions(+), 33 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/beos/GLView.cpp b/src/mesa/drivers/beos/GLView.cpp index 44e51a58dbb..56c1b7773b9 100644 --- a/src/mesa/drivers/beos/GLView.cpp +++ b/src/mesa/drivers/beos/GLView.cpp @@ -1,4 +1,4 @@ -/* $Id: GLView.cpp,v 1.4 2000/11/14 17:51:15 brianp Exp $ */ +/* $Id: GLView.cpp,v 1.5 2000/11/17 21:01:26 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -27,6 +27,11 @@ /* * $Log: GLView.cpp,v $ + * Revision 1.5 2000/11/17 21:01:26 brianp + * Minor header file changes to silence warnings. + * Added _mesa_enable_sw_extensions(), called by software-only drivers + * to enable all s/w-supported GL extensions. + * * Revision 1.4 2000/11/14 17:51:15 brianp * more Driver.Color, Driver.Index updates * @@ -71,6 +76,7 @@ #include #include #include "../src/context.h" +#include "extensions.h" // BeOS component ordering for B_RGBA32 bitmap format @@ -1037,6 +1043,8 @@ BGLView::BGLView(BRect rect, char *name, const GLboolean direct = GL_TRUE; GLcontext *ctx = _mesa_create_context( visual, NULL, aux, direct ); + _mesa_enable_sw_extensions(ctx); + aux->Init(this, ctx, visual, buffer ); // Hook aux data into BGLView object diff --git a/src/mesa/drivers/ggi/ggimesa.c b/src/mesa/drivers/ggi/ggimesa.c index 764ccba803e..fffbaa5f4ff 100644 --- a/src/mesa/drivers/ggi/ggimesa.c +++ b/src/mesa/drivers/ggi/ggimesa.c @@ -30,6 +30,7 @@ #include #include +#include "extensions.h" #undef VIS #undef FLIP @@ -319,6 +320,8 @@ GGIMesaContext GGIMesaCreateContext(void) if (!ctx->gl_ctx) return NULL; + _mesa_enable_sw_extensions(ctx->gl_ctx); + return ctx; } diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 178fa192ac0..6dbbec4d593 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -121,22 +121,6 @@ static void fxDDBufferSize(GLcontext *ctx, GLuint *width, GLuint *height) } -/* Set current drawing color */ -static void fxDDSetColor(GLcontext *ctx, GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha ) -{ - fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx; - GLubyte col[4]; - ASSIGN_4V( col, red, green, blue, alpha ); - - if (MESA_VERBOSE&VERBOSE_DRIVER) { - fprintf(stderr,"fxmesa: fxDDSetColor(%d,%d,%d,%d)\n",red,green,blue,alpha); - } - - fxMesa->color=FXCOLOR4(col); -} - - /* Implements glClearColor() */ static void fxDDClearColor(GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) @@ -976,11 +960,6 @@ void fxSetupDDPointers(GLcontext *ctx) ctx->Driver.ClearColor=fxDDClearColor; ctx->Driver.Clear=fxDDClear; -#if 0 - ctx->Driver.Index=NULL; - ctx->Driver.Color=fxDDSetColor; -#endif - ctx->Driver.SetDrawBuffer=fxDDSetDrawBuffer; ctx->Driver.SetReadBuffer=fxDDSetReadBuffer; ctx->Driver.GetBufferSize=fxDDBufferSize; diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 74850556a76..9f7280564cc 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,4 +1,4 @@ -/* $Id: osmesa.c,v 1.31 2000/11/16 21:05:38 keithw Exp $ */ +/* $Id: osmesa.c,v 1.32 2000/11/17 21:01:40 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -53,6 +53,7 @@ #include "swrast/s_depth.h" #include "swrast/s_lines.h" #include "swrast/s_triangle.h" +#include "tnl/tnl.h" #endif @@ -273,9 +274,8 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, FREE(osmesa); return NULL; } - gl_extensions_enable(&(osmesa->gl_ctx),"GL_HP_occlusion_test"); - gl_extensions_enable(&(osmesa->gl_ctx), "GL_ARB_texture_cube_map"); - gl_extensions_enable(&(osmesa->gl_ctx), "GL_EXT_texture_env_combine"); + + _mesa_enable_sw_extensions(&(osmesa->gl_ctx)); osmesa->gl_buffer = _mesa_create_framebuffer( osmesa->gl_visual, osmesa->gl_visual->DepthBits > 0, diff --git a/src/mesa/drivers/svga/svgamesa.c b/src/mesa/drivers/svga/svgamesa.c index 5163e08ece6..4a6c34b4f0c 100644 --- a/src/mesa/drivers/svga/svgamesa.c +++ b/src/mesa/drivers/svga/svgamesa.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa.c,v 1.8 2000/11/16 21:05:39 keithw Exp $ */ +/* $Id: svgamesa.c,v 1.9 2000/11/17 21:01:44 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -39,12 +39,13 @@ #else #include #include +#include #include #include "GL/svgamesa.h" #include "context.h" +#include "extensions.h" #include "matrix.h" #include "types.h" -#include #endif #include "svgapix.h" @@ -418,6 +419,8 @@ SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer ) NULL, /* share list context */ (void *) ctx, GL_TRUE ); + _mesa_enable_sw_extensions(ctx->gl_ctx); + ctx->gl_buffer = _mesa_create_framebuffer( ctx->gl_vis, ctx->gl_vis->DepthBits > 0, ctx->gl_vis->StencilBits > 0, diff --git a/src/mesa/drivers/windows/wmesa.c b/src/mesa/drivers/windows/wmesa.c index 55c5c402afc..b55142e8add 100644 --- a/src/mesa/drivers/windows/wmesa.c +++ b/src/mesa/drivers/windows/wmesa.c @@ -1,4 +1,4 @@ -/* $Id: wmesa.c,v 1.11 2000/11/14 17:40:15 brianp Exp $ */ +/* $Id: wmesa.c,v 1.12 2000/11/17 21:01:47 brianp Exp $ */ /* * Windows (Win32) device driver for Mesa 3.4 @@ -1284,6 +1284,8 @@ WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal, return NULL; } + _mesa_enable_sw_extensions(c->gl_ctx); + c->gl_buffer = _mesa_create_framebuffer( c->gl_visual, c->gl_visual->DepthBits > 0, c->gl_visual->StencilBits > 0, diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index f48da3bbfe5..412d1eed966 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.8 2000/11/16 21:05:40 keithw Exp $ */ +/* $Id: xm_api.c,v 1.9 2000/11/17 21:01:48 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1638,9 +1638,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) return NULL; } - gl_extensions_enable(ctx, "GL_HP_occlusion_test"); - gl_extensions_enable(ctx, "GL_ARB_texture_cube_map"); - gl_extensions_enable(ctx, "GL_EXT_texture_env_combine"); + _mesa_enable_sw_extensions(ctx); if (CHECK_BYTE_ORDER(v)) { c->swapbytes = GL_FALSE; -- cgit v1.2.3