~ubuntu-branches/ubuntu/quantal/mesa/quantal

« back to all changes in this revision

Viewing changes to src/mesa/swrast/s_texcombine.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-02-21 12:44:07 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20070221124407-rgcacs32mycrtadl
ImportĀ upstreamĀ versionĀ 6.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1073
1073
 * Apply texture mapping to a span of fragments.
1074
1074
 */
1075
1075
void
1076
 
_swrast_texture_span( GLcontext *ctx, struct sw_span *span )
 
1076
_swrast_texture_span( GLcontext *ctx, SWspan *span )
1077
1077
{
1078
1078
   SWcontext *swrast = SWRAST_CONTEXT(ctx);
1079
1079
   GLchan primary_rgba[MAX_WIDTH][4];
1132
1132
 
1133
1133
         /* GL_SGI_texture_color_table */
1134
1134
         if (texUnit->ColorTableEnabled) {
1135
 
            _mesa_lookup_rgba_chan(&texUnit->ColorTable, span->end, texels);
 
1135
#if CHAN_TYPE == GL_UNSIGNED_BYTE
 
1136
            _mesa_lookup_rgba_ubyte(&texUnit->ColorTable, span->end, texels);
 
1137
#elif CHAN_TYPE == GL_UNSIGNED_SHORT
 
1138
            _mesa_lookup_rgba_ubyte(&texUnit->ColorTable, span->end, texels);
 
1139
#else
 
1140
            _mesa_lookup_rgba_float(&texUnit->ColorTable, span->end, texels);
 
1141
#endif
1136
1142
         }
1137
1143
      }
1138
1144
   }