summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/allegro
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/allegro')
-rw-r--r--src/mesa/drivers/allegro/generic.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/allegro/generic.h b/src/mesa/drivers/allegro/generic.h
index 898a055d62..cbdf5ff2b3 100644
--- a/src/mesa/drivers/allegro/generic.h
+++ b/src/mesa/drivers/allegro/generic.h
@@ -18,13 +18,14 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-static void clear_color_generic(GLcontext *ctx,
- GLubyte red, GLubyte green,
- GLubyte blue, GLubyte alpha)
+static void clear_color_generic(GLcontext *ctx, const GLfloat color[4])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
-
- context->ClearColor = makecol(red, green, blue);
+ GLubyte r, g, b;
+ CLAMPED_FLOAT_TO_UBYTE(r, color[0]);
+ CLAMPED_FLOAT_TO_UBYTE(g, color[1]);
+ CLAMPED_FLOAT_TO_UBYTE(b, color[2]);
+ context->ClearColor = makecol(r, g, b);
}