summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/beos/GLView.cpp10
-rw-r--r--src/mesa/drivers/ggi/ggimesa.c3
-rw-r--r--src/mesa/drivers/glide/fxdd.c21
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c8
-rw-r--r--src/mesa/drivers/svga/svgamesa.c7
-rw-r--r--src/mesa/drivers/windows/wmesa.c4
-rw-r--r--src/mesa/drivers/x11/xm_api.c6
-rw-r--r--src/mesa/main/extensions.c17
-rw-r--r--src/mesa/main/extensions.h5
-rw-r--r--src/mesa/math/m_translate.h8
-rw-r--r--src/mesa/math/m_xform.c3
-rw-r--r--src/mesa/math/m_xform.h6
12 files changed, 58 insertions, 40 deletions
diff --git a/src/mesa/drivers/beos/GLView.cpp b/src/mesa/drivers/beos/GLView.cpp
index 44e51a58db..56c1b7773b 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 <stdio.h>
#include <GLView.h>
#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 764ccba803..fffbaa5f4f 100644
--- a/src/mesa/drivers/ggi/ggimesa.c
+++ b/src/mesa/drivers/ggi/ggimesa.c
@@ -30,6 +30,7 @@
#include <ggi/mesa/ggimesa_int.h>
#include <ggi/mesa/debug.h>
+#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 178fa192ac..6dbbec4d59 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 74850556a7..9f7280564c 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 5163e08ece..4a6c34b4f0 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 <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <vga.h>
#include "GL/svgamesa.h"
#include "context.h"
+#include "extensions.h"
#include "matrix.h"
#include "types.h"
-#include <string.h>
#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 55c5c402af..b55142e8ad 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 f48da3bbfe..412d1eed96 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;
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index c83b112763..a36e6b00be 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -1,4 +1,4 @@
-/* $Id: extensions.c,v 1.40 2000/10/30 16:27:21 brianp Exp $ */
+/* $Id: extensions.c,v 1.41 2000/11/17 21:01:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -109,6 +109,21 @@ static struct {
+/*
+ * Enable all extensions suitable for a software-only renderer.
+ * This is a convenience function used by the XMesa, OSMesa, GGI drivers, etc.
+ */
+void
+_mesa_enable_sw_extensions(GLcontext *ctx)
+{
+ gl_extensions_enable(ctx, "GL_ARB_texture_cube_map");
+ gl_extensions_enable(ctx, "GL_EXT_bgra");
+ gl_extensions_enable(ctx, "GL_EXT_texture_env_combine");
+ gl_extensions_enable(ctx, "GL_HP_occlusion_test");
+ gl_extensions_enable(ctx, "GL_NV_blend_square");
+}
+
+
int gl_extensions_add( GLcontext *ctx,
GLboolean enabled,
diff --git a/src/mesa/main/extensions.h b/src/mesa/main/extensions.h
index 4c861b32ac..f11926b196 100644
--- a/src/mesa/main/extensions.h
+++ b/src/mesa/main/extensions.h
@@ -1,4 +1,4 @@
-/* $Id: extensions.h,v 1.9 2000/10/30 13:32:00 keithw Exp $ */
+/* $Id: extensions.h,v 1.10 2000/11/17 21:01:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,6 +31,9 @@
#include "types.h"
+extern void
+_mesa_enable_sw_extensions(GLcontext *ctx);
+
/* Return 0 on success.
*/
diff --git a/src/mesa/math/m_translate.h b/src/mesa/math/m_translate.h
index 5c60b972ff..a109dfa721 100644
--- a/src/mesa/math/m_translate.h
+++ b/src/mesa/math/m_translate.h
@@ -1,4 +1,4 @@
-/* $Id: m_translate.h,v 1.1 2000/11/16 21:05:41 keithw Exp $ */
+/* $Id: m_translate.h,v 1.2 2000/11/17 21:01:49 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -28,6 +28,8 @@
#ifndef _M_TRANSLATE_H_
#define _M_TRANSLATE_H_
+#include "config.h"
+
typedef void (*trans_1f_func)(GLfloat *to,
CONST void *ptr,
@@ -86,7 +88,9 @@ extern trans_4ub_func gl_trans_4ub_tab[5][MAX_TYPES];
extern trans_4f_func gl_trans_4f_tab[5][MAX_TYPES];
-extern void gl_init_translate( void );
+
+extern void
+_math_init_translate( void );
#endif
diff --git a/src/mesa/math/m_xform.c b/src/mesa/math/m_xform.c
index 6bc6a9cea3..7509a350d8 100644
--- a/src/mesa/math/m_xform.c
+++ b/src/mesa/math/m_xform.c
@@ -1,4 +1,4 @@
-/* $Id: m_xform.c,v 1.1 2000/11/16 21:05:41 keithw Exp $ */
+/* $Id: m_xform.c,v 1.2 2000/11/17 21:01:49 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -41,6 +41,7 @@
#include "mmath.h"
#include "m_matrix.h"
+#include "m_translate.h"
#include "m_xform.h"
diff --git a/src/mesa/math/m_xform.h b/src/mesa/math/m_xform.h
index 1c6ac461e8..7fc5be3ab1 100644
--- a/src/mesa/math/m_xform.h
+++ b/src/mesa/math/m_xform.h
@@ -1,4 +1,4 @@
-/* $Id: m_xform.h,v 1.1 2000/11/16 21:05:41 keithw Exp $ */
+/* $Id: m_xform.h,v 1.2 2000/11/17 21:01:49 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -34,6 +34,7 @@
#include "glheader.h"
#include "config.h"
+#include "math/math.h"
#include "math/m_vector.h"
#include "math/m_matrix.h"
@@ -78,7 +79,8 @@ extern void gl_transform_vector( GLfloat u[4],
const GLfloat m[16] );
-extern void gl_init_transformation( void );
+extern void
+_math_init_transformation( void );
/* KW: Clip functions now do projective divide as well. The projected