diff options
author | Brian Paul <[email protected]> | 2001-12-14 02:50:01 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-12-14 02:50:01 +0000 |
commit | 86b842790b720cd6b1499ce8edca8a4e9c8dc029 (patch) | |
tree | abb453fefb2beb047768c7077edc449f1d58fcef /src/mesa/swrast | |
parent | 680522f74c8b7bf982eab1bc127269521c48a632 (diff) |
vertex program check-in
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_bitmap.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_copypix.c | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index 5f129933149..6252fad771d 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -1,4 +1,4 @@ -/* $Id: s_bitmap.c,v 1.12 2001/06/26 21:15:36 brianp Exp $ */ +/* $Id: s_bitmap.c,v 1.13 2001/12/14 02:50:57 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -76,7 +76,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, if (ctx->Fog.Enabled) { if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT) - fog = _mesa_z_to_fogfactor(ctx, ctx->Current.FogCoord); + fog = _mesa_z_to_fogfactor(ctx, ctx->Current.Attrib[VERT_ATTRIB_FOG][0]); else fog = _mesa_z_to_fogfactor(ctx, ctx->Current.RasterDistance); } 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 { |