aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_array_api.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-01-24 00:04:58 +0000
committerBrian Paul <[email protected]>2001-01-24 00:04:58 +0000
commit74b493a5e61237de081a438e774e5d8139d4c6b7 (patch)
treea8bc94a65bacc67b9b1473f91a2bd84cd2b25937 /src/mesa/tnl/t_array_api.c
parent125fddc31dc9959901d9f1ece693b09f04426d48 (diff)
Lots of GLchan datatype changes.
Added GLvector4us datatype in math/m_vector.[ch] Added _math_trans_4us() in math/m_translate.[ch] Choose GLvector4ub, GLvector4us, GLvector4f at compile time based on CHAN_BITS. Made Driver.ClearColor() and Driver.ClearIndex() optional driver functions. Changed args to Driver.ClearColor(), updated drivers. Reordered files in Makefile.X11
Diffstat (limited to 'src/mesa/tnl/t_array_api.c')
-rw-r--r--src/mesa/tnl/t_array_api.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c
index 908328513d8..b3ef1dbeed0 100644
--- a/src/mesa/tnl/t_array_api.c
+++ b/src/mesa/tnl/t_array_api.c
@@ -1,10 +1,10 @@
-/* $Id: t_array_api.c,v 1.3 2001/01/14 06:14:21 keithw Exp $ */
+/* $Id: t_array_api.c,v 1.4 2001/01/24 00:04:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -336,8 +336,16 @@ void _tnl_array_init( GLcontext *ctx )
*/
gl_vector4f_init( &tmp->Obj, 0, 0 );
gl_vector3f_init( &tmp->Normal, 0, 0 );
+#if CHAN_TYPE == GL_UNSIGNED_BYTE
gl_vector4ub_init( &tmp->Color, 0, 0 );
gl_vector4ub_init( &tmp->SecondaryColor, 0, 0 );
+#elif CHAN_TYPE == GL_UNSIGNED_SHORT
+ gl_vector4us_init( &tmp->Color, 0, 0 );
+ gl_vector4us_init( &tmp->SecondaryColor, 0, 0 );
+#elif CHAN_TYPE == GL_FLOAT
+ gl_vector4f_init( &tmp->Color, 0, 0 );
+ gl_vector4f_init( &tmp->SecondaryColor, 0, 0 );
+#endif
gl_vector1f_init( &tmp->FogCoord, 0, 0 );
gl_vector1ui_init( &tmp->Index, 0, 0 );
gl_vector1ub_init( &tmp->EdgeFlag, 0, 0 );