From fc80ad6e62fb2b53d53756593099330477a44c52 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 4 Oct 2002 19:10:06 +0000 Subject: Changed a number of context fields from GLchan to GLfloat (such as ClearColor). Also changed parameter types for some driver functions (like ctx->Driver.Clear- Color). Updated all the device drivers. Someday, we want to support 8, 16 and 32-bit channels dynamically at runtime. --- src/mesa/drivers/glide/fxdd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/mesa/drivers/glide/fxdd.c') diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index d4ef05be146..9b98cdd106a 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -1,4 +1,4 @@ -/* $Id: fxdd.c,v 1.91 2002/09/27 02:45:38 brianp Exp $ */ +/* $Id: fxdd.c,v 1.92 2002/10/04 19:10:10 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -125,17 +125,21 @@ fxDDBufferSize(GLframebuffer *buffer, GLuint * width, GLuint * height) /* Implements glClearColor() */ static void -fxDDClearColor(GLcontext * ctx, const GLchan color[4]) +fxDDClearColor(GLcontext * ctx, const GLfloat color[4]) { fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; GLubyte col[4]; if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDClearColor(%d,%d,%d,%d)\n", + fprintf(stderr, "fxmesa: fxDDClearColor(%f,%f,%f,%f)\n", color[0], color[1], color[2], color[3]); } - ASSIGN_4V(col, color[0], color[1], color[2], 255); + CLAMPED_FLOAT_TO_UBYTE(col[0], color[0]); + CLAMPED_FLOAT_TO_UBYTE(col[1], color[1]); + CLAMPED_FLOAT_TO_UBYTE(col[2], color[2]); + CLAMPED_FLOAT_TO_UBYTE(col[3], color[3]); + fxMesa->clearC = FXCOLOR4(col); fxMesa->clearA = color[3]; } -- cgit v1.2.3