summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_imm_exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl/t_imm_exec.c')
-rw-r--r--src/mesa/tnl/t_imm_exec.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_imm_exec.c b/src/mesa/tnl/t_imm_exec.c
index 4d3f874ce4..5889592a1a 100644
--- a/src/mesa/tnl/t_imm_exec.c
+++ b/src/mesa/tnl/t_imm_exec.c
@@ -1,10 +1,10 @@
-/* $Id: t_imm_exec.c,v 1.8 2001/01/14 06:14:21 keithw Exp $ */
+/* $Id: t_imm_exec.c,v 1.9 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"),
@@ -253,7 +253,7 @@ static void _tnl_vb_bind_immediate( GLcontext *ctx, struct immediate *IM )
if (inputs & VERT_SPEC_RGB) {
tmp->SecondaryColor.data = IM->SecondaryColor + start;
- tmp->SecondaryColor.start = (GLubyte *)(IM->SecondaryColor + start);
+ tmp->SecondaryColor.start = (GLchan *)(IM->SecondaryColor + start);
tmp->SecondaryColor.count = count;
VB->SecondaryColorPtr[0] = &tmp->SecondaryColor;
}
@@ -264,7 +264,7 @@ static void _tnl_vb_bind_immediate( GLcontext *ctx, struct immediate *IM )
if (inputs & VERT_RGBA) {
tmp->Color.data = IM->Color + start;
- tmp->Color.start = (GLubyte *)(IM->Color + start);
+ tmp->Color.start = (GLchan *)(IM->Color + start);
tmp->Color.count = count;
VB->ColorPtr[0] = &tmp->Color;
}
@@ -486,8 +486,16 @@ void _tnl_imm_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 );