summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/extensions.c38
-rw-r--r--src/mesa/main/extensions.h8
-rw-r--r--src/mesa/main/get.c35
-rw-r--r--src/mesa/main/mtypes.h3
4 files changed, 72 insertions, 12 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index bfecb3af7be..ad2807401b1 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -1,4 +1,4 @@
-/* $Id: extensions.c,v 1.75 2002/06/15 03:03:08 brianp Exp $ */
+/* $Id: extensions.c,v 1.76 2002/06/29 20:03:13 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -81,11 +81,11 @@ static struct {
{ OFF, "GL_EXT_blend_minmax", F(EXT_blend_minmax) },
{ OFF, "GL_EXT_blend_subtract", F(EXT_blend_subtract) },
{ ON, "GL_EXT_clip_volume_hint", F(EXT_clip_volume_hint) },
- { OFF, "GL_EXT_cull_vertex", 0 },
{ OFF, "GL_EXT_convolution", F(EXT_convolution) },
{ ON, "GL_EXT_compiled_vertex_array", F(EXT_compiled_vertex_array) },
{ OFF, "GL_EXT_fog_coord", F(EXT_fog_coord) },
{ OFF, "GL_EXT_histogram", F(EXT_histogram) },
+ { OFF, "GL_EXT_multi_draw_arrays", F(EXT_multi_draw_arrays) },
{ ON, "GL_EXT_packed_pixels", F(EXT_packed_pixels) },
{ OFF, "GL_EXT_paletted_texture", F(EXT_paletted_texture) },
{ OFF, "GL_EXT_point_parameters", F(EXT_point_parameters) },
@@ -257,6 +257,40 @@ _mesa_enable_1_3_extensions(GLcontext *ctx)
/*
+ * Enable all OpenGL 1.4 features and extensions.
+ */
+void
+_mesa_enable_1_4_extensions(GLcontext *ctx)
+{
+ const char *extensions[] = {
+ "GL_ARB_depth_texture",
+ "GL_ARB_point_parameters",
+ "GL_ARB_shadow",
+ "GL_ARB_texture_env_crossbar",
+ "GL_ARB_texture_mirrored_repeat",
+ "GL_ARB_window_pos",
+ "GL_EXT_blend_color",
+ "GL_EXT_blend_func_separate",
+ "GL_EXT_blend_logic_op",
+ "GL_EXT_blend_minmax",
+ "GL_EXT_blend_subtract",
+ "GL_EXT_fog_coord",
+ "GL_EXT_multi_draw_arrays",
+ "GL_EXT_secondary_color",
+ "GL_EXT_stencil_wrap",
+ "GL_SGIS_generate_mipmap",
+ NULL
+ };
+ GLuint i;
+
+ for (i = 0; extensions[i]; i++) {
+ _mesa_enable_extension(ctx, extensions[i]);
+ }
+}
+
+
+
+/*
* Add a new extenstion. This would be called from a Mesa driver.
*/
void
diff --git a/src/mesa/main/extensions.h b/src/mesa/main/extensions.h
index bbf6debc79c..d940be2e434 100644
--- a/src/mesa/main/extensions.h
+++ b/src/mesa/main/extensions.h
@@ -1,10 +1,10 @@
-/* $Id: extensions.h,v 1.14 2001/06/15 14:18:46 brianp Exp $ */
+/* $Id: extensions.h,v 1.15 2002/06/29 20:03:13 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -37,6 +37,8 @@ extern void _mesa_enable_imaging_extensions(GLcontext *ctx);
extern void _mesa_enable_1_3_extensions(GLcontext *ctx);
+extern void _mesa_enable_1_4_extensions(GLcontext *ctx);
+
extern void _mesa_add_extension( GLcontext *ctx, GLboolean enabled,
const char *name, GLboolean *flag_ptr );
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index a99a5fb6c90..55802ba8440 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1,4 +1,4 @@
-/* $Id: get.c,v 1.84 2002/06/29 19:48:15 brianp Exp $ */
+/* $Id: get.c,v 1.85 2002/06/29 20:03:13 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -5596,6 +5596,7 @@ _mesa_GetString( GLenum name )
static const char *renderer = "Mesa";
static const char *version_1_2 = "1.2 Mesa 4.1 beta";
static const char *version_1_3 = "1.3 Mesa 4.1 beta";
+ static const char *version_1_4 = "1.4 Mesa 4.1 beta";
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
@@ -5612,16 +5613,38 @@ _mesa_GetString( GLenum name )
case GL_RENDERER:
return (const GLubyte *) renderer;
case GL_VERSION:
- if (ctx->Extensions.ARB_multitexture &&
- ctx->Extensions.ARB_multisample &&
+ if (ctx->Extensions.ARB_multisample &&
+ ctx->Extensions.ARB_multitexture &&
ctx->Extensions.ARB_texture_border_clamp &&
ctx->Extensions.ARB_texture_compression &&
ctx->Extensions.EXT_texture_env_add &&
ctx->Extensions.ARB_texture_env_combine &&
- ctx->Extensions.ARB_texture_env_dot3)
- return (const GLubyte *) version_1_3;
- else
+ ctx->Extensions.ARB_texture_env_dot3) {
+ if (ctx->Extensions.ARB_depth_texture &&
+ ctx->Extensions.ARB_shadow &&
+ ctx->Extensions.ARB_texture_env_crossbar &&
+ ctx->Extensions.ARB_texture_mirrored_repeat &&
+ ctx->Extensions.ARB_window_pos &&
+ ctx->Extensions.EXT_blend_color &&
+ ctx->Extensions.EXT_blend_func_separate &&
+ ctx->Extensions.EXT_blend_logic_op &&
+ ctx->Extensions.EXT_blend_minmax &&
+ ctx->Extensions.EXT_blend_subtract &&
+ ctx->Extensions.EXT_fog_coord &&
+ ctx->Extensions.EXT_multi_draw_arrays &&
+ ctx->Extensions.EXT_point_parameters && /*aka ARB*/
+ ctx->Extensions.EXT_secondary_color &&
+ ctx->Extensions.EXT_stencil_wrap &&
+ ctx->Extensions.SGIS_generate_mipmap) {
+ return (const GLubyte *) version_1_4;
+ }
+ else {
+ return (const GLubyte *) version_1_3;
+ }
+ }
+ else {
return (const GLubyte *) version_1_2;
+ }
case GL_EXTENSIONS:
return (const GLubyte *) _mesa_extensions_get_string(ctx);
default:
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 0b73a431b5a..b5798bc0942 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1,4 +1,4 @@
-/* $Id: mtypes.h,v 1.82 2002/06/29 19:48:16 brianp Exp $ */
+/* $Id: mtypes.h,v 1.83 2002/06/29 20:03:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1387,6 +1387,7 @@ struct gl_extensions {
GLboolean EXT_compiled_vertex_array;
GLboolean EXT_fog_coord;
GLboolean EXT_histogram;
+ GLboolean EXT_multi_draw_arrays;
GLboolean EXT_packed_pixels;
GLboolean EXT_paletted_texture;
GLboolean EXT_point_parameters;