summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_vb_light.c13
-rw-r--r--src/mesa/tnl/t_vb_lighttmp.h60
-rw-r--r--src/mesa/tnl/t_vb_render.c20
3 files changed, 29 insertions, 64 deletions
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index 00beb531232..ce180880fb0 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_light.c,v 1.7 2001/02/16 00:35:35 keithw Exp $ */
+/* $Id: t_vb_light.c,v 1.8 2001/02/16 18:14:42 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -174,8 +174,7 @@ static GLboolean run_validate_lighting( GLcontext *ctx,
if (ctx->Visual.rgbMode) {
if (ctx->Light._NeedVertices) {
- if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR &&
- ctx->Texture._ReallyEnabled)
+ if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
tab = _tnl_light_spec_tab;
else
tab = _tnl_light_tab;
@@ -271,8 +270,7 @@ static void check_lighting( GLcontext *ctx, struct gl_pipeline_stage *stage )
stage->inputs |= VERT_RGBA;
stage->outputs = VERT_RGBA;
- if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR &&
- ctx->Texture._ReallyEnabled)
+ if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
stage->outputs |= VERT_SPEC_RGB;
}
}
@@ -309,9 +307,8 @@ static void dtr( struct gl_pipeline_stage *stage )
const struct gl_pipeline_stage _tnl_lighting_stage =
{
"lighting",
- _NEW_LIGHT|_NEW_TEXTURE, /* recheck; texture for seperate_specular */
- _NEW_LIGHT|_NEW_MODELVIEW|
- _NEW_TEXTURE, /* recalc -- modelview dependency
+ _NEW_LIGHT, /* recheck */
+ _NEW_LIGHT|_NEW_MODELVIEW, /* recalc -- modelview dependency
* otherwise not captured by inputs
* (which may be VERT_OBJ) */
0,0,0, /* active, inputs, outputs */
diff --git a/src/mesa/tnl/t_vb_lighttmp.h b/src/mesa/tnl/t_vb_lighttmp.h
index 50bbedd8a0c..b9b50219b32 100644
--- a/src/mesa/tnl/t_vb_lighttmp.h
+++ b/src/mesa/tnl/t_vb_lighttmp.h
@@ -1,4 +1,4 @@
-/* $Id: t_vb_lighttmp.h,v 1.7 2001/02/16 00:35:35 keithw Exp $ */
+/* $Id: t_vb_lighttmp.h,v 1.8 2001/02/16 18:14:42 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -524,19 +524,20 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
if (stage->changed_inputs == 0)
return;
- if ( CHECK_COLOR_MATERIAL(j) )
- gl_update_color_material( ctx, (GLchan *)CMcolor[j] );
+ do {
- if ( CHECK_MATERIAL(j) )
- gl_update_material( ctx, new_material[j], new_material_mask[j] );
+ if ( CHECK_COLOR_MATERIAL(j) )
+ gl_update_color_material( ctx, (GLchan *)CMcolor[j] );
+
+ if ( CHECK_MATERIAL(j) )
+ gl_update_material( ctx, new_material[j], new_material_mask[j] );
- if ( CHECK_VALIDATE(j) )
- gl_validate_all_lighting_tables( ctx );
+ if ( CHECK_VALIDATE(j) )
+ gl_validate_all_lighting_tables( ctx );
- baseubyte[0][3] = ctx->Light._BaseAlpha[0];
- baseubyte[1][3] = ctx->Light._BaseAlpha[1];
+ baseubyte[0][3] = ctx->Light._BaseAlpha[0];
+ baseubyte[1][3] = ctx->Light._BaseAlpha[1];
- do {
/* No attenuation, so incoporate _MatAmbient into base color.
*/
{
@@ -596,17 +597,6 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
STRIDE_F(normal, NSTRIDE);
}
- /* Have to recompute our base colors on material change.
- */
- if ( CHECK_MATERIAL(j) )
- gl_update_material( ctx, new_material[j], new_material_mask[j] );
-
- if ( CHECK_COLOR_MATERIAL(j) )
- gl_update_color_material( ctx, (GLchan *)CMcolor[j] );
-
- if ( CHECK_VALIDATE(j) )
- gl_validate_all_lighting_tables( ctx );
-
} while (!CHECK_END_VB(j));
}
@@ -651,19 +641,20 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
if (stage->changed_inputs == 0)
return;
- if ( CHECK_COLOR_MATERIAL(j) )
- gl_update_color_material( ctx, *CMcolor );
-
- if ( CHECK_MATERIAL(j) )
- gl_update_material( ctx, new_material[j], new_material_mask[j] );
-
- if ( CHECK_VALIDATE(j) )
- gl_validate_all_lighting_tables( ctx );
-
do {
do {
GLfloat sum[2][3];
+ if ( CHECK_COLOR_MATERIAL(j) )
+ gl_update_color_material( ctx, CMcolor[j] );
+
+ if ( CHECK_MATERIAL(j) )
+ gl_update_material( ctx, new_material[j], new_material_mask[j] );
+
+ if ( CHECK_VALIDATE(j) )
+ gl_validate_all_lighting_tables( ctx );
+
+
COPY_3V(sum[0], ctx->Light._BaseColor[0]);
if (IDX & LIGHT_TWOSIDE)
COPY_3V(sum[1], ctx->Light._BaseColor[1]);
@@ -721,15 +712,6 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
STRIDE_F(normal, NSTRIDE);
}
- if ( CHECK_COLOR_MATERIAL(j) )
- gl_update_color_material( ctx, CMcolor[j] );
-
- if ( CHECK_MATERIAL(j) )
- gl_update_material( ctx, new_material[j], new_material_mask[j] );
-
- if ( CHECK_VALIDATE(j) )
- gl_validate_all_lighting_tables( ctx );
-
} while (!CHECK_END_VB(j));
}
diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c
index 9412a0fcb99..25e03a8c4e8 100644
--- a/src/mesa/tnl/t_vb_render.c
+++ b/src/mesa/tnl/t_vb_render.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_render.c,v 1.13 2001/02/16 00:35:35 keithw Exp $ */
+/* $Id: t_vb_render.c,v 1.14 2001/02/16 18:14:42 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -63,18 +63,6 @@
-/* typedef void (*clip_line_func)( GLcontext *ctx, */
-/* GLuint i, GLuint j, */
-/* GLubyte mask); */
-
-/* typedef void (*clip_poly_func)( GLcontext *ctx, */
-/* GLuint n, GLuint vlist[], */
-/* GLubyte mask ); */
-
-
-
-
-
/**********************************************************************/
/* Clip single primitives */
/**********************************************************************/
@@ -184,7 +172,7 @@ do { \
#define TAG(x) clip_##x##_verts
#define INIT(x) ctx->Driver.RenderPrimitive( ctx, x )
#define RESET_STIPPLE if (stipple) ctx->Driver.ResetLineStipple( ctx )
-#define RESET_OCCLUSION ctx->OcclusionResult = GL_TRUE;
+#define RESET_OCCLUSION ctx->OcclusionResult = GL_TRUE
#define PRESERVE_VB_DEFS
#include "t_vb_rendertmp.h"
@@ -268,7 +256,7 @@ static void clip_elt_triangles( GLcontext *ctx,
(void) elt;
#define RESET_STIPPLE ctx->Driver.ResetLineStipple( ctx )
-#define RESET_OCCLUSION ctx->OcclusionResult = GL_TRUE;
+#define RESET_OCCLUSION ctx->OcclusionResult = GL_TRUE
#define INIT(x) ctx->Driver.RenderPrimitive( ctx, x )
#define RENDER_TAB_QUALIFIER
#define PRESERVE_VB_DEFS
@@ -337,8 +325,6 @@ static GLboolean run_render( GLcontext *ctx,
length= VB->PrimitiveLength[i];
ASSERT(length || (flags & PRIM_LAST));
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
-/* fprintf(stderr, "Render %s %d..%d\n", */
-/* _mesa_prim_name[flags&PRIM_MODE_MASK], i, i+length); */
if (length)
tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags );
}