From 94b30dc390f1fdd526c080080830016fad3e2ee2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 25 Apr 2006 00:53:25 +0000 Subject: Put color index attribute into the 6th attribute slot. Update a lot of loops, conditionals to use the _TNL_FIRST/LAST_* values instead of specific vertex attributes. Remove the EdgeFlagv function from the GLvertexformat struct. --- src/mesa/swrast_setup/ss_context.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa/swrast_setup') diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index 0ce81e0487..99cd7b5a33 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -133,6 +133,9 @@ _swsetup_RenderStart( GLcontext *ctx ) if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_COLOR1 )) EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_4CHAN_4F_RGBA, specular); + if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_COLOR_INDEX )) + EMIT_ATTR( _TNL_ATTRIB_COLOR_INDEX, EMIT_1F, index ); + if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_FOG )) EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1F, fog); @@ -152,9 +155,6 @@ _swsetup_RenderStart( GLcontext *ctx ) } } - if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_INDEX )) - EMIT_ATTR( _TNL_ATTRIB_INDEX, EMIT_1F, index ); - if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_POINTSIZE )) EMIT_ATTR( _TNL_ATTRIB_POINTSIZE, EMIT_1F, pointSize ); @@ -247,8 +247,8 @@ _swsetup_Translate( GLcontext *ctx, const void *vertex, SWvertex *dest ) _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_FOG, tmp ); dest->fog = tmp[0]; - _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_INDEX, tmp ); - dest->index = (GLuint) tmp[0]; + _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR_INDEX, tmp ); + dest->index = tmp[0]; _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_POINTSIZE, tmp ); dest->pointSize = tmp[0]; -- cgit v1.2.3