From 6532db986883ea1a431c043126de4947465834a1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 3 Jan 2001 15:59:30 +0000 Subject: More color macro clean-ups. FLOAT_TO_CHAN() macro removed. --- src/mesa/swrast/s_texture.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/mesa/swrast/s_texture.c') diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index bcc5f2677d..29d6b46f4d 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -1,4 +1,4 @@ -/* $Id: s_texture.c,v 1.5 2001/01/02 22:02:52 brianp Exp $ */ +/* $Id: s_texture.c,v 1.6 2001/01/03 15:59:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1841,8 +1841,8 @@ _mesa_texture_combine(const GLcontext *ctx, break; case GL_CONSTANT_EXT: { - GLchan (*c)[4] = ccolor[j]; - GLchan alpha = FLOAT_TO_CHAN(textureUnit->EnvColor[3]); + GLchan alpha, (*c)[4] = ccolor[j]; + UNCLAMPED_FLOAT_TO_CHAN(alpha, textureUnit->EnvColor[3]); for (i = 0; i < n; i++) c[i][ACOMP] = alpha; argA[j] = ccolor[j]; @@ -1865,9 +1865,10 @@ _mesa_texture_combine(const GLcontext *ctx, case GL_CONSTANT_EXT: { GLchan (*c)[4] = ccolor[j]; - const GLchan red = FLOAT_TO_CHAN(textureUnit->EnvColor[0]); - const GLchan green = FLOAT_TO_CHAN(textureUnit->EnvColor[1]); - const GLchan blue = FLOAT_TO_CHAN(textureUnit->EnvColor[2]); + GLchan red, green, blue; + UNCLAMPED_FLOAT_TO_CHAN(red, textureUnit->EnvColor[0]); + UNCLAMPED_FLOAT_TO_CHAN(green, textureUnit->EnvColor[1]); + UNCLAMPED_FLOAT_TO_CHAN(blue, textureUnit->EnvColor[2]); for (i = 0; i < n; i++) { c[i][RCOMP] = red; c[i][GCOMP] = green; -- cgit v1.2.3