aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_lighttmp.h
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2001-02-16 18:14:41 +0000
committerKeith Whitwell <[email protected]>2001-02-16 18:14:41 +0000
commit46b0988c673b28e072fd0cbf477632a9ab6f9f18 (patch)
tree3463116da957c6f13dcb0b415ca8476640503fc7 /src/mesa/tnl/t_vb_lighttmp.h
parent2448fc7deeaa870d879de17158f243f239c05b15 (diff)
Allow swrast to cope (fairly) cleanly with GL_SEPERATE_SPECULAR when
texturing is not enabled, and without requiring the two colors be added externally. As a part of this, collapsed the decomposition of quads into triangles inside swrast to be hardwired into _swrast_Quad; removed s_quads.[ch]. Removed checks on texture state from t_vb_light.c, which was previously required by swrast. Moved the t_dd_ templates to a new directory.
Diffstat (limited to 'src/mesa/tnl/t_vb_lighttmp.h')
-rw-r--r--src/mesa/tnl/t_vb_lighttmp.h60
1 files changed, 21 insertions, 39 deletions
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));
}