summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2000-04-19 23:56:08 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2000-04-19 23:56:08 +0000
commit8033ed691e1e5d238394336d86fc1316ed90cf6e (patch)
treef10d4cf685b1406a75c8ce3931db067d7af740e2
parent59aa79ea5edae1e306a52f1c8a77a15e52f22936 (diff)
downloadmesa-8033ed691e1e5d238394336d86fc1316ed90cf6e.tar.gz
Always use smooth shaded triangles, emulating flat ones by emitting
vertices with identical color values.
-rw-r--r--src/mesa/drivers/glide/fxsetup.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c
index bd15261248c..330fc9133d2 100644
--- a/src/mesa/drivers/glide/fxsetup.c
+++ b/src/mesa/drivers/glide/fxsetup.c
@@ -69,7 +69,7 @@ static void fxSetupDepthTest(GLcontext *ctx);
static void fxSetupScissor(GLcontext *ctx);
static void fxSetupCull(GLcontext *ctx);
static void gl_print_fx_state_flags( const char *msg, GLuint flags);
-static GLboolean fxMultipassBlend(struct vertex_buffer *, GLuint);
+/* static GLboolean fxMultipassBlend(struct vertex_buffer *, GLuint); */
static GLboolean fxMultipassTexture( struct vertex_buffer *, GLuint );
static void fxTexValidate(GLcontext *ctx, struct gl_texture_object *tObj)
@@ -183,7 +183,7 @@ static GLuint fxGetTexSetConfiguration(GLcontext *ctx,
GLuint envmode=0;
GLuint ifmt=0;
- if((ctx->Light.ShadeModel==GL_SMOOTH) ||
+ if((ctx->Light.ShadeModel==GL_SMOOTH) || 1 ||
(ctx->Point.SmoothFlag) ||
(ctx->Line.SmoothFlag) ||
(ctx->Polygon.SmoothFlag))
@@ -191,11 +191,13 @@ static GLuint fxGetTexSetConfiguration(GLcontext *ctx,
else
unitsmode|=FX_UM_ALPHA_CONSTANT;
- if(ctx->Light.ShadeModel==GL_SMOOTH)
+ if(ctx->Light.ShadeModel==GL_SMOOTH || 1)
unitsmode|=FX_UM_COLOR_ITERATED;
else
unitsmode|=FX_UM_COLOR_CONSTANT;
+
+
/*
OpenGL Feeds Texture 0 into Texture 1
Glide Feeds Texture 1 into Texture 0
@@ -471,8 +473,8 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset)
else
unitsmode=fxGetTexSetConfiguration(ctx,NULL,tObj);
- if(fxMesa->lastUnitsMode==unitsmode)
- return;
+/* if(fxMesa->lastUnitsMode==unitsmode) */
+/* return; */
fxMesa->lastUnitsMode=unitsmode;
@@ -550,9 +552,8 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset)
FXTRUE);
ctx->Driver.MultipassFunc = fxMultipassBlend;
#else
-#ifndef FX_SILENT
- fprintf(stderr,"fx Driver: GL_BLEND not yet supported\n");
-#endif
+ if (MESA_VERBOSE&VERBOSE_DRIVER)
+ fprintf(stderr,"fx Driver: GL_BLEND not yet supported\n");
#endif
break;
case GL_REPLACE:
@@ -583,9 +584,9 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset)
FXFALSE);
break;
default:
-#ifndef FX_SILENT
- fprintf(stderr,"fx Driver: %x Texture.EnvMode not yet supported\n",ctx->Texture.Unit[textureset].EnvMode);
-#endif
+ if (MESA_VERBOSE&VERBOSE_DRIVER)
+ fprintf(stderr, "fx Driver: %x Texture.EnvMode not yet supported\n",
+ ctx->Texture.Unit[textureset].EnvMode);
break;
}
@@ -759,8 +760,8 @@ static void fxSetupTextureDoubleTMU_NoLock(GLcontext *ctx)
unitsmode=fxGetTexSetConfiguration(ctx,tObj0,tObj1);
- if(fxMesa->lastUnitsMode==unitsmode)
- return;
+/* if(fxMesa->lastUnitsMode==unitsmode) */
+/* return; */
fxMesa->lastUnitsMode=unitsmode;
@@ -1025,7 +1026,7 @@ static void fxSetupTextureNone_NoLock(GLcontext *ctx)
fprintf(stderr,"fxmesa: fxSetupTextureNone(...)\n");
}
- if((ctx->Light.ShadeModel==GL_SMOOTH) ||
+ if((ctx->Light.ShadeModel==GL_SMOOTH) || 1 ||
(ctx->Point.SmoothFlag) ||
(ctx->Line.SmoothFlag) ||
(ctx->Polygon.SmoothFlag))
@@ -1033,7 +1034,7 @@ static void fxSetupTextureNone_NoLock(GLcontext *ctx)
else
locala=GR_COMBINE_LOCAL_CONSTANT;
- if(ctx->Light.ShadeModel==GL_SMOOTH)
+ if(ctx->Light.ShadeModel==GL_SMOOTH || 1)
localc=GR_COMBINE_LOCAL_ITERATED;
else
localc=GR_COMBINE_LOCAL_CONSTANT;