diff options
author | Brian Paul <[email protected]> | 2001-07-13 20:07:37 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-07-13 20:07:37 +0000 |
commit | f431a3fb4dc1bf860203d79e54657e3a62bc50df (patch) | |
tree | 51a598faf5e8b971b2bd7cf85702e021426f54c6 /src/mesa/swrast/s_blend.c | |
parent | bc07a99cc3faeb1aa48700065b34baa76c201e7d (diff) |
assorted changes for supporting GLfloat color channels (not done)
Diffstat (limited to 'src/mesa/swrast/s_blend.c')
-rw-r--r-- | src/mesa/swrast/s_blend.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c index 73ca3d1c52d..3c0e64a5fe8 100644 --- a/src/mesa/swrast/s_blend.c +++ b/src/mesa/swrast/s_blend.c @@ -1,4 +1,4 @@ -/* $Id: s_blend.c,v 1.7 2001/03/19 02:25:36 keithw Exp $ */ +/* $Id: s_blend.c,v 1.8 2001/07/13 20:07:37 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -216,6 +216,12 @@ blend_modulate( GLcontext *ctx, GLuint n, const GLubyte mask[], for (i=0;i<n;i++) { if (mask[i]) { +#if CHAN_TYPE == GL_FLOAT + rgba[i][RCOMP] = rgba[i][RCOMP] * dest[i][RCOMP]; + rgba[i][GCOMP] = rgba[i][GCOMP] * dest[i][GCOMP]; + rgba[i][BCOMP] = rgba[i][BCOMP] * dest[i][BCOMP]; + rgba[i][ACOMP] = rgba[i][ACOMP] * dest[i][ACOMP]; +#else GLint r = (rgba[i][RCOMP] * dest[i][RCOMP]) >> 8; GLint g = (rgba[i][GCOMP] * dest[i][GCOMP]) >> 8; GLint b = (rgba[i][BCOMP] * dest[i][BCOMP]) >> 8; @@ -224,6 +230,7 @@ blend_modulate( GLcontext *ctx, GLuint n, const GLubyte mask[], rgba[i][GCOMP] = (GLchan) g; rgba[i][BCOMP] = (GLchan) b; rgba[i][ACOMP] = (GLchan) a; +#endif } } } |