aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_copypix.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-12-14 02:50:01 +0000
committerBrian Paul <[email protected]>2001-12-14 02:50:01 +0000
commit86b842790b720cd6b1499ce8edca8a4e9c8dc029 (patch)
treeabb453fefb2beb047768c7077edc449f1d58fcef /src/mesa/swrast/s_copypix.c
parent680522f74c8b7bf982eab1bc127269521c48a632 (diff)
vertex program check-in
Diffstat (limited to 'src/mesa/swrast/s_copypix.c')
-rw-r--r--src/mesa/swrast/s_copypix.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 1dd570af05f..f4d08f8f85a 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -1,4 +1,4 @@
-/* $Id: s_copypix.c,v 1.24 2001/07/23 16:07:39 brianp Exp $ */
+/* $Id: s_copypix.c,v 1.25 2001/12/14 02:50:57 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -748,10 +748,16 @@ static void copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
/* setup colors or indexes */
if (ctx->Visual.rgbMode) {
- GLuint *rgba32 = (GLuint *) rgba;
- GLuint color = *(GLuint*)( ctx->Current.Color );
+ GLchan r, g, b, a;
+ UNCLAMPED_FLOAT_TO_CHAN(r, ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
+ UNCLAMPED_FLOAT_TO_CHAN(g, ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
+ UNCLAMPED_FLOAT_TO_CHAN(b, ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
+ UNCLAMPED_FLOAT_TO_CHAN(a, ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
for (i = 0; i < width; i++) {
- rgba32[i] = color;
+ rgba[i][RCOMP] = r;
+ rgba[i][GCOMP] = g;
+ rgba[i][BCOMP] = b;
+ rgba[i][ACOMP] = a;
}
}
else {