summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhwaechtler <hwaechtler>2000-07-16 07:39:42 +0000
committerhwaechtler <hwaechtler>2000-07-16 07:39:42 +0000
commitf40676ab8b5450a2c152011d30490dc49d87e76b (patch)
tree935bbd8f60d9618967d2c568497f5657d9d51566
parent9d48fc663cf94313b10a595f7c81cd21d632a384 (diff)
replaced _EXT by _MESA in new tokens
-rw-r--r--include/GL/glext.h22
-rw-r--r--progs/demos/perpixel.c14
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c4
-rw-r--r--src/mesa/main/extensions.c6
-rw-r--r--src/mesa/main/texstate.c38
5 files changed, 50 insertions, 34 deletions
diff --git a/include/GL/glext.h b/include/GL/glext.h
index 58edbf03a4..ac7337af13 100644
--- a/include/GL/glext.h
+++ b/include/GL/glext.h
@@ -1419,17 +1419,17 @@ extern "C" {
#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
#endif
-#ifndef GL_EXT_texture_env_combine2
-#define GL_ADD_MODULATE_EXT 0x6000
-#define GL_ADD_SIGNED_MODULATE_EXT 0x6001
-#define GL_MODULATE_ADD_EXT 0x6002
-#define GL_MODULATE_ADD_SIGNED_EXT 0x6003
-#define GL_MODULATE3_EXT 0x6004
-#define GL_ADD3_EXT 0x6005
-#define GL_DOT3_EXT 0x6006
-#define GL_DOT3_SIGNED_EXT 0x6007
-#define GL_DOT3_MODULATE_EXT 0x6008
-#define GL_DOT3_SIGNED_MODULATE_EXT 0x6009
+#ifndef GL_MESA_texture_env_combine2
+#define GL_ADD_MODULATE_MESA 0x6000
+#define GL_ADD_SIGNED_MODULATE_MESA 0x6001
+#define GL_MODULATE_ADD_MESA 0x6002
+#define GL_MODULATE_ADD_SIGNED_MESA 0x6003
+#define GL_MODULATE3_MESA 0x6004
+#define GL_ADD3_MESA 0x6005
+#define GL_DOT3_MESA 0x6006
+#define GL_DOT3_SIGNED_MESA 0x6007
+#define GL_DOT3_MODULATE_MESA 0x6008
+#define GL_DOT3_SIGNED_MODULATE_MESA 0x6009
#endif
/*************************************************************/
diff --git a/progs/demos/perpixel.c b/progs/demos/perpixel.c
index 431d0b182a..d83337596a 100644
--- a/progs/demos/perpixel.c
+++ b/progs/demos/perpixel.c
@@ -354,7 +354,7 @@ render_perpixel (Mesh *m, int width, int height)
glEnable (GL_TEXTURE_2D);
glBindTexture (GL_TEXTURE_2D, m->normal_specular_texture);
glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
- glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_DOT3_EXT);
+ glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_DOT3_MESA);
glTexEnvi (GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT);
glTexEnvi (GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE);
glTexEnvi (GL_TEXTURE_ENV, GL_OPERAND0_RGB_EXT, GL_SRC_COLOR);
@@ -414,7 +414,7 @@ render_perpixel (Mesh *m, int width, int height)
glBindTexture (GL_TEXTURE_2D, m->normal_specular_texture);
glEnable (GL_TEXTURE_2D);
glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
- glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_DOT3_MODULATE_EXT);
+ glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_DOT3_MODULATE_MESA);
glTexEnvi (GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_PRIMARY_COLOR_EXT);
glTexEnvi (GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_TEXTURE);
glTexEnvi (GL_TEXTURE_ENV, GL_SOURCE2_RGB_EXT, GL_CONSTANT_EXT);
@@ -432,7 +432,7 @@ render_perpixel (Mesh *m, int width, int height)
glBindTexture (GL_TEXTURE_2D, m->color_texture);
glEnable (GL_TEXTURE_2D);
glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
- glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_ADD_MODULATE_EXT);
+ glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_ADD_MODULATE_MESA);
glTexEnvi (GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_PREVIOUS_EXT);
glTexEnvi (GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_CONSTANT_EXT);
glTexEnvfv (GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, ambient_light);
@@ -769,8 +769,8 @@ static void initGL (void)
printf("Sorry, GL_EXT_texture_env_combine not supported.\n");
exit(1);
}
- if (!strstr(exten, "GL_EXT_texture_env_combine2")) {
- printf("Sorry, GL_EXT_texture_env_combine2 not supported.\n");
+ if (!strstr(exten, "GL_MESA_texture_env_combine2")) {
+ printf("Sorry, GL_MESA_texture_env_combine2 not supported.\n");
exit(1);
}
@@ -818,8 +818,6 @@ int main (int argc, char *argv[])
glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
glutCreateWindow (argv[0]);
- initGL ();
-
if (argc > 1 && strcmp(argv[1], "-info")==0) {
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
@@ -827,6 +825,8 @@ int main (int argc, char *argv[])
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
}
+ initGL ();
+
printf (usage, argv[0]);
glutReshapeFunc (reshape);
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 2e94394332..00e0b260a3 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1,4 +1,4 @@
-/* $Id: osmesa.c,v 1.19.2.1 2000/07/16 06:52:15 hwaechtler Exp $ */
+/* $Id: osmesa.c,v 1.19.2.2 2000/07/16 07:39:43 hwaechtler Exp $ */
/*
* Mesa 3-D graphics library
@@ -227,7 +227,7 @@ OSMesaCreateContext( GLenum format, OSMesaContext sharelist )
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");
- gl_extensions_enable(&(osmesa->gl_ctx), "GL_EXT_texture_env_combine2");
+ gl_extensions_enable(&(osmesa->gl_ctx), "GL_MESA_texture_env_combine2");
osmesa->gl_buffer = gl_create_framebuffer( osmesa->gl_visual,
osmesa->gl_visual->DepthBits > 0,
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 2ff22adbfe..bbb29b25cf 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -1,4 +1,4 @@
-/* $Id: extensions.c,v 1.32.2.1 2000/07/16 06:52:15 hwaechtler Exp $ */
+/* $Id: extensions.c,v 1.32.2.2 2000/07/16 07:39:43 hwaechtler Exp $ */
/*
* Mesa 3-D graphics library
@@ -76,7 +76,6 @@ static struct { int enabled; const char *name; } default_extensions[] = {
{ DEFAULT_OFF, "GL_EXT_texture_env" },
{ DEFAULT_ON, "GL_EXT_texture_env_add" },
{ DEFAULT_OFF, "GL_EXT_texture_env_combine" },
- { DEFAULT_OFF, "GL_EXT_texture_env_combine2" },
{ ALWAYS_ENABLED, "GL_EXT_texture_object" },
{ DEFAULT_ON, "GL_EXT_texture_lod_bias" },
{ ALWAYS_ENABLED, "GL_EXT_vertex_array" },
@@ -85,6 +84,7 @@ static struct { int enabled; const char *name; } default_extensions[] = {
{ DEFAULT_ON, "GL_INGR_blend_func_separate" },
{ ALWAYS_ENABLED, "GL_MESA_window_pos" },
{ ALWAYS_ENABLED, "GL_MESA_resize_buffers" },
+ { DEFAULT_OFF, "GL_MESA_texture_env_combine2" },
{ DEFAULT_OFF, "GL_NV_blend_square" },
{ ALWAYS_ENABLED, "GL_NV_texgen_reflection" },
{ DEFAULT_ON, "GL_PGI_misc_hints" },
@@ -106,7 +106,7 @@ update_extension_flags( GLcontext *ctx )
/* Update flags */
ctx->Extensions.HaveTextureEnvAdd = gl_extension_is_enabled(ctx, "GL_EXT_texture_env_add");
ctx->Extensions.HaveTextureEnvCombine = gl_extension_is_enabled(ctx, "GL_EXT_texture_env_combine");
- ctx->Extensions.HaveTextureEnvCombine2 = gl_extension_is_enabled(ctx, "GL_EXT_texture_env_combine2");
+ ctx->Extensions.HaveTextureEnvCombine2 = gl_extension_is_enabled(ctx, "GL_MESA_texture_env_combine2");
ctx->Extensions.HaveTextureLodBias = gl_extension_is_enabled(ctx, "GL_EXT_texture_lod_bias");
ctx->Extensions.HaveHpOcclusionTest = gl_extension_is_enabled(ctx, "GL_HP_occlusion_test");
ctx->Extensions.HaveTextureCubeMap = gl_extension_is_enabled(ctx, "GL_ARB_texture_cube_map");
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 66e8a3421d..e9e88db0f1 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.15.2.1 2000/07/16 06:52:15 hwaechtler Exp $ */
+/* $Id: texstate.c,v 1.15.2.2 2000/07/16 07:39:43 hwaechtler Exp $ */
/*
* Mesa 3-D graphics library
@@ -123,16 +123,16 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
texUnit->CombineModeRGB = mode;
ctx->NewState |= NEW_TEXTURE_ENV;
break;
- case GL_ADD_MODULATE_EXT:
- case GL_ADD_SIGNED_MODULATE_EXT:
- case GL_MODULATE_ADD_EXT:
- case GL_MODULATE_ADD_SIGNED_EXT:
- case GL_ADD3_EXT:
- case GL_MODULATE3_EXT:
- case GL_DOT3_EXT:
- case GL_DOT3_SIGNED_EXT:
- case GL_DOT3_MODULATE_EXT:
- case GL_DOT3_SIGNED_MODULATE_EXT:
+ case GL_ADD_MODULATE_MESA:
+ case GL_ADD_SIGNED_MODULATE_MESA:
+ case GL_MODULATE_ADD_MESA:
+ case GL_MODULATE_ADD_SIGNED_MESA:
+ case GL_ADD3_MESA:
+ case GL_MODULATE3_MESA:
+ case GL_DOT3_MESA:
+ case GL_DOT3_SIGNED_MESA:
+ case GL_DOT3_MODULATE_MESA:
+ case GL_DOT3_SIGNED_MODULATE_MESA:
if (ctx->Extensions.HaveTextureEnvCombine2) {
if (texUnit->CombineModeRGB == mode)
return; /* no change */
@@ -167,6 +167,22 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
texUnit->CombineModeA = mode;
ctx->NewState |= NEW_TEXTURE_ENV;
break;
+ case GL_ADD_MODULATE_MESA:
+ case GL_ADD_SIGNED_MODULATE_MESA:
+ case GL_MODULATE_ADD_MESA:
+ case GL_MODULATE_ADD_SIGNED_MESA:
+ case GL_ADD3_MESA:
+ case GL_MODULATE3_MESA:
+ if (ctx->Extensions.HaveTextureEnvCombine2) {
+ if (texUnit->CombineModeA == mode)
+ return; /* no change */
+ texUnit->CombineModeA = mode;
+ ctx->NewState |= NEW_TEXTURE_ENV;
+ } else {
+ gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" );
+ return;
+ }
+ break;
default:
gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" );
return;