summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/allegro
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-10-04 19:10:06 +0000
committerBrian Paul <[email protected]>2002-10-04 19:10:06 +0000
commitfc80ad6e62fb2b53d53756593099330477a44c52 (patch)
tree0b47f3ee84d613dfa2264d6f23e5c2a60cecc9ba /src/mesa/drivers/allegro
parentf782b8189e718974a40d72ac4f6b8d213ca99e1e (diff)
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.
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 898a055d623..cbdf5ff2b3a 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);
}