diff options
author | hwaechtler <hwaechtler> | 2000-07-16 06:52:13 +0000 |
---|---|---|
committer | hwaechtler <hwaechtler> | 2000-07-16 06:52:13 +0000 |
commit | ee5f47b8d67e254b07772239c6d66307999d9f9a (patch) | |
tree | a097523299faee8f13ca4103bbe3e2d8431d8596 | |
parent | d126c7f8d8ae16748a61ab4d05e3a59ee55c759f (diff) |
initial mesa_3_3_texture_env_combine2 revision
-rw-r--r-- | Make-config | 15 | ||||
-rw-r--r-- | include/GL/glext.h | 12 | ||||
-rw-r--r-- | progs/demos/Makefile.X11 | 3 | ||||
-rw-r--r-- | progs/images/color.rgb | bin | 0 -> 86651 bytes | |||
-rw-r--r-- | progs/images/disp.rgb | bin | 0 -> 135085 bytes | |||
-rw-r--r-- | progs/images/white.rgb | bin | 0 -> 12032 bytes | |||
-rw-r--r-- | src/mesa/Makefile.X11 | 2 | ||||
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 3 | ||||
-rw-r--r-- | src/mesa/main/Makefile.X11 | 2 | ||||
-rw-r--r-- | src/mesa/main/extensions.c | 4 | ||||
-rw-r--r-- | src/mesa/main/texstate.c | 38 |
11 files changed, 64 insertions, 15 deletions
diff --git a/Make-config b/Make-config index 36bd62c634..62189d8c39 100644 --- a/Make-config +++ b/Make-config @@ -1,4 +1,4 @@ -# $Id: Make-config,v 1.25 2000/06/08 15:19:12 brianp Exp $ +# $Id: Make-config,v 1.25.2.1 2000/07/16 06:52:13 hwaechtler Exp $ MESA_MAJOR=3 MESA_MINOR=3 @@ -559,7 +559,7 @@ linux-3dnow: "GLU_LIB = libGLU.so" \ "GLUT_LIB = libglut.so" \ "GLW_LIB = libGLw.so" \ - "CC = gcc -malign-loops=2 -malign-jumps=2 -malign-functions=2" \ + "CC = cc -malign-loops=2 -malign-jumps=2 -malign-functions=2" \ "CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -ffast-math -funroll-loops -fomit-frame-pointer -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DPTHREADS -I/usr/X11R6/include" \ "MAKELIB = ../bin/mklib.linux" \ "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lm -lpthread" \ @@ -1292,9 +1292,9 @@ linux-elf-debug: "GLUT_LIB = libglut.so" \ "GLW_LIB = libGLw.so" \ "CC = gcc" \ - "CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG -DSVGA -I/usr/include/glide -DFX" \ + "CFLAGS = -O0 -g -ansi -pedantic -Wall -Wmissing-prototypes -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG " \ "MAKELIB = ../bin/mklib.linux" \ - "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lvga -L/usr/local/glide/lib -lglide2x" \ + "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread " \ "GLU_LIB_DEPS = -L../lib -lGL -lm" \ "GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \ "APP_LIB_DEPS = -lglut -lGLU -lGL" @@ -1318,14 +1318,13 @@ linux-prof: "GLUT_LIB = libglut.a" \ "GLW_LIB = libGLw.a" \ "CC = gcc" \ - "CFLAGS = -O2 -pg -ansi -pedantic -Wall -DUSE_XSHM -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -I/usr/include/glide -I/usr/local/glide/include" \ + "CFLAGS = -O2 -pg -ansi -pedantic -Wall -DUSE_XSHM -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM " \ "MAKELIB = ../bin/mklib.ar-ruv" \ - "APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -L/usr/X11/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm" \ + "APP_LIB_DEPS = -L/usr/X11/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm" \ "ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S \ X86/mmx_blend.S \ X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \ X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \ X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \ X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \ - X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S \ - FX/X86/fx_3dnow_fastpath.S" + X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S" diff --git a/include/GL/glext.h b/include/GL/glext.h index f721a9fd70..58edbf03a4 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -1419,6 +1419,18 @@ 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 +#endif /*************************************************************/ diff --git a/progs/demos/Makefile.X11 b/progs/demos/Makefile.X11 index 0afb622327..a74c5533a2 100644 --- a/progs/demos/Makefile.X11 +++ b/progs/demos/Makefile.X11 @@ -1,4 +1,4 @@ -# $Id: Makefile.X11,v 1.14 2000/06/27 16:54:18 brianp Exp $ +# $Id: Makefile.X11,v 1.14.2.1 2000/07/16 06:52:14 hwaechtler Exp $ # Mesa 3-D graphics library # Version: 3.3 @@ -36,6 +36,7 @@ PROGS = bounce \ occlude \ osdemo \ paltex \ + perpixel \ pixeltex \ pointblast \ ray \ diff --git a/progs/images/color.rgb b/progs/images/color.rgb Binary files differnew file mode 100644 index 0000000000..f1debbb4ad --- /dev/null +++ b/progs/images/color.rgb diff --git a/progs/images/disp.rgb b/progs/images/disp.rgb Binary files differnew file mode 100644 index 0000000000..16bf257350 --- /dev/null +++ b/progs/images/disp.rgb diff --git a/progs/images/white.rgb b/progs/images/white.rgb Binary files differnew file mode 100644 index 0000000000..a420025741 --- /dev/null +++ b/progs/images/white.rgb diff --git a/src/mesa/Makefile.X11 b/src/mesa/Makefile.X11 index 56d2fe524e..e0c2342140 100644 --- a/src/mesa/Makefile.X11 +++ b/src/mesa/Makefile.X11 @@ -1,4 +1,4 @@ -# $Id: Makefile.X11,v 1.20 2000/07/14 14:55:04 brianp Exp $ +# $Id: Makefile.X11,v 1.19.2.1 2000/07/16 06:52:15 hwaechtler Exp $ # Mesa 3-D graphics library # Version: 3.3 diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 5605960711..2e94394332 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 2000/06/27 21:42:14 brianp Exp $ */ +/* $Id: osmesa.c,v 1.19.2.1 2000/07/16 06:52:15 hwaechtler Exp $ */ /* * Mesa 3-D graphics library @@ -227,6 +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"); osmesa->gl_buffer = gl_create_framebuffer( osmesa->gl_visual, osmesa->gl_visual->DepthBits > 0, diff --git a/src/mesa/main/Makefile.X11 b/src/mesa/main/Makefile.X11 index 56d2fe524e..e0c2342140 100644 --- a/src/mesa/main/Makefile.X11 +++ b/src/mesa/main/Makefile.X11 @@ -1,4 +1,4 @@ -# $Id: Makefile.X11,v 1.20 2000/07/14 14:55:04 brianp Exp $ +# $Id: Makefile.X11,v 1.19.2.1 2000/07/16 06:52:15 hwaechtler Exp $ # Mesa 3-D graphics library # Version: 3.3 diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 5d4ad1bb9e..2ff22adbfe 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -1,4 +1,4 @@ -/* $Id: extensions.c,v 1.32 2000/06/27 21:42:13 brianp Exp $ */ +/* $Id: extensions.c,v 1.32.2.1 2000/07/16 06:52:15 hwaechtler Exp $ */ /* * Mesa 3-D graphics library @@ -76,6 +76,7 @@ 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" }, @@ -105,6 +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.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 47cec1e4c5..66e8a3421d 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -1,4 +1,4 @@ -/* $Id: texstate.c,v 1.15 2000/07/05 16:14:24 brianp Exp $ */ +/* $Id: texstate.c,v 1.15.2.1 2000/07/16 06:52:15 hwaechtler Exp $ */ /* * Mesa 3-D graphics library @@ -123,6 +123,26 @@ _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: + if (ctx->Extensions.HaveTextureEnvCombine2) { + if (texUnit->CombineModeRGB == mode) + return; /* no change */ + texUnit->CombineModeRGB = 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; @@ -253,7 +273,21 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) } break; case GL_OPERAND2_RGB_EXT: - if (ctx->Extensions.HaveTextureEnvCombine) { + if (ctx->Extensions.HaveTextureEnvCombine2) { + if ((GLenum) (GLint) *param == GL_SRC_ALPHA || + (GLenum) (GLint) *param == GL_ONE_MINUS_SRC_ALPHA || + (GLenum) (GLint) *param == GL_SRC_COLOR || + (GLenum) (GLint) *param == GL_ONE_MINUS_SRC_COLOR) + { + texUnit->CombineOperandRGB[2] = (GLenum) (GLint) *param; + ctx->NewState |= NEW_TEXTURE_ENV; + } + else { + gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); + return; + } + } + else if (ctx->Extensions.HaveTextureEnvCombine) { if ((GLenum) (GLint) *param == GL_SRC_ALPHA) { texUnit->CombineOperandRGB[2] = (GLenum) (GLint) *param; ctx->NewState |= NEW_TEXTURE_ENV; |