From e5a6fcc345867b550a159a7d94912a81e618279c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 13 Oct 2006 00:44:31 +0000 Subject: Revamp color table code. Always store all color tables as both float and ubyte. --- src/mesa/swrast/s_texcombine.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mesa/swrast') diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c index efa2ed3488d..2a3455f35e2 100644 --- a/src/mesa/swrast/s_texcombine.c +++ b/src/mesa/swrast/s_texcombine.c @@ -1132,7 +1132,13 @@ _swrast_texture_span( GLcontext *ctx, SWspan *span ) /* GL_SGI_texture_color_table */ if (texUnit->ColorTableEnabled) { - _mesa_lookup_rgba_chan(&texUnit->ColorTable, span->end, texels); +#if CHAN_TYPE == GL_UNSIGNED_BYTE + _mesa_lookup_rgba_ubyte(&texUnit->ColorTable, span->end, texels); +#elif CHAN_TYPE == GL_UNSIGNED_SHORT + _mesa_lookup_rgba_ubyte(&texUnit->ColorTable, span->end, texels); +#else + _mesa_lookup_rgba_float(&texUnit->ColorTable, span->end, texels); +#endif } } } -- cgit v1.2.3