summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/pixel.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-01-03 15:59:30 +0000
committerBrian Paul <[email protected]>2001-01-03 15:59:30 +0000
commit6532db986883ea1a431c043126de4947465834a1 (patch)
treeafff13a66669d89ac029fc3183385c9b1f751bba /src/mesa/main/pixel.c
parent3b399df6382d3cfb3cf9bfde4888878bebd2903f (diff)
More color macro clean-ups.
FLOAT_TO_CHAN() macro removed.
Diffstat (limited to 'src/mesa/main/pixel.c')
-rw-r--r--src/mesa/main/pixel.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index 6bbbbdfe3ec..270cbc7e8cb 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -1,4 +1,4 @@
-/* $Id: pixel.c,v 1.22 2000/12/26 05:09:29 keithw Exp $ */
+/* $Id: pixel.c,v 1.23 2001/01/03 15:59:30 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1126,10 +1126,10 @@ _mesa_map_ci_to_rgba_chan( const GLcontext *ctx, GLuint n,
const GLfloat *aMap = ctx->Pixel.MapItoA;
GLuint i;
for (i=0;i<n;i++) {
- rgba[i][RCOMP] = FLOAT_TO_CHAN(rMap[index[i] & rmask]);
- rgba[i][GCOMP] = FLOAT_TO_CHAN(gMap[index[i] & gmask]);
- rgba[i][BCOMP] = FLOAT_TO_CHAN(bMap[index[i] & bmask]);
- rgba[i][ACOMP] = FLOAT_TO_CHAN(aMap[index[i] & amask]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], rMap[index[i] & rmask]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], gMap[index[i] & gmask]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], bMap[index[i] & bmask]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][ACOMP], aMap[index[i] & amask]);
}
#endif
}
@@ -1194,10 +1194,10 @@ _mesa_map_ci8_to_rgba( const GLcontext *ctx, GLuint n, const GLubyte index[],
const GLfloat *aMap = ctx->Pixel.MapItoA;
GLuint i;
for (i=0;i<n;i++) {
- rgba[i][RCOMP] = FLOAT_TO_CHAN(rMap[index[i] & rmask]);
- rgba[i][GCOMP] = FLOAT_TO_CHAN(gMap[index[i] & gmask]);
- rgba[i][BCOMP] = FLOAT_TO_CHAN(bMap[index[i] & bmask]);
- rgba[i][ACOMP] = FLOAT_TO_CHAN(aMap[index[i] & amask]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], rMap[index[i] & rmask]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], gMap[index[i] & gmask]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], bMap[index[i] & bmask]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][ACOMP], aMap[index[i] & amask]);
}
#endif
}