summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_alphabuf.c4
-rw-r--r--src/mesa/swrast/s_buffers.c20
2 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/swrast/s_alphabuf.c b/src/mesa/swrast/s_alphabuf.c
index 0da11a5f25..9002d9099a 100644
--- a/src/mesa/swrast/s_alphabuf.c
+++ b/src/mesa/swrast/s_alphabuf.c
@@ -1,4 +1,4 @@
-/* $Id: s_alphabuf.c,v 1.3 2001/01/23 23:39:37 brianp Exp $ */
+/* $Id: s_alphabuf.c,v 1.4 2001/01/24 00:04:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -136,7 +136,7 @@ _mesa_alloc_alpha_buffers( GLcontext *ctx )
void
_mesa_clear_alpha_buffers( GLcontext *ctx )
{
- const GLchan aclear = (GLint) (ctx->Color.ClearColor[3] * CHAN_MAXF);
+ const GLchan aclear = ctx->Color.ClearColor[3];
GLuint bufferBit;
ASSERT(ctx->DrawBuffer->UseSoftwareAlphaBuffers);
diff --git a/src/mesa/swrast/s_buffers.c b/src/mesa/swrast/s_buffers.c
index 46ffe8cc90..bff5da0088 100644
--- a/src/mesa/swrast/s_buffers.c
+++ b/src/mesa/swrast/s_buffers.c
@@ -1,4 +1,4 @@
-/* $Id: s_buffers.c,v 1.3 2001/01/23 23:39:37 brianp Exp $ */
+/* $Id: s_buffers.c,v 1.4 2001/01/24 00:04:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -51,15 +51,15 @@ clear_color_buffer_with_masking( GLcontext *ctx )
if (ctx->Visual.rgbMode) {
/* RGBA mode */
- const GLchan r = (GLint) (ctx->Color.ClearColor[0] * CHAN_MAXF);
- const GLchan g = (GLint) (ctx->Color.ClearColor[1] * CHAN_MAXF);
- const GLchan b = (GLint) (ctx->Color.ClearColor[2] * CHAN_MAXF);
- const GLchan a = (GLint) (ctx->Color.ClearColor[3] * CHAN_MAXF);
+ const GLchan r = ctx->Color.ClearColor[0];
+ const GLchan g = ctx->Color.ClearColor[1];
+ const GLchan b = ctx->Color.ClearColor[2];
+ const GLchan a = ctx->Color.ClearColor[3];
GLint i;
for (i = 0; i < height; i++) {
GLchan rgba[MAX_WIDTH][4];
GLint j;
- for (j=0; j<width; j++) {
+ for (j = 0; j < width; j++) {
rgba[j][RCOMP] = r;
rgba[j][GCOMP] = g;
rgba[j][BCOMP] = b;
@@ -101,10 +101,10 @@ clear_color_buffer(GLcontext *ctx)
if (ctx->Visual.rgbMode) {
/* RGBA mode */
- const GLchan r = (GLint) (ctx->Color.ClearColor[0] * CHAN_MAXF);
- const GLchan g = (GLint) (ctx->Color.ClearColor[1] * CHAN_MAXF);
- const GLchan b = (GLint) (ctx->Color.ClearColor[2] * CHAN_MAXF);
- const GLchan a = (GLint) (ctx->Color.ClearColor[3] * CHAN_MAXF);
+ const GLchan r = ctx->Color.ClearColor[0];
+ const GLchan g = ctx->Color.ClearColor[1];
+ const GLchan b = ctx->Color.ClearColor[2];
+ const GLchan a = ctx->Color.ClearColor[3];
GLchan span[MAX_WIDTH][4];
GLint i;