-/* $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
/*
* $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
*
#include <stdio.h>
#include <GLView.h>
#include "../src/context.h"
+#include "extensions.h"
// BeOS component ordering for B_RGBA32 bitmap format
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
#include <ggi/mesa/ggimesa_int.h>
#include <ggi/mesa/debug.h>
+#include "extensions.h"
#undef VIS
#undef FLIP
if (!ctx->gl_ctx)
return NULL;
+ _mesa_enable_sw_extensions(ctx->gl_ctx);
+
return ctx;
}
}
-/* 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 )
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;
-/* $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
#include "swrast/s_depth.h"
#include "swrast/s_lines.h"
#include "swrast/s_triangle.h"
+#include "tnl/tnl.h"
#endif
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,
-/* $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
#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"
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,
-/* $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
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,
-/* $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
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;
-/* $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
+/*
+ * 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,
-/* $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
#include "types.h"
+extern void
+_mesa_enable_sw_extensions(GLcontext *ctx);
+
/* Return 0 on success.
*/
-/* $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
#ifndef _M_TRANSLATE_H_
#define _M_TRANSLATE_H_
+#include "config.h"
+
typedef void (*trans_1f_func)(GLfloat *to,
CONST void *ptr,
extern trans_4f_func gl_trans_4f_tab[5][MAX_TYPES];
-extern void gl_init_translate( void );
+
+extern void
+_math_init_translate( void );
#endif
-/* $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
#include "mmath.h"
#include "m_matrix.h"
+#include "m_translate.h"
#include "m_xform.h"
-/* $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
#include "glheader.h"
#include "config.h"
+#include "math/math.h"
#include "math/m_vector.h"
#include "math/m_matrix.h"
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