diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2006-04-25 00:53:25 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2006-04-25 00:53:25 +0000 |
commit | 94b30dc390f1fdd526c080080830016fad3e2ee2 (patch) | |
tree | 92643c41eae15bcf373a9777ca04e73cfe46c7c3 /src/mesa/tnl/t_context.h | |
parent | 5bdc6fdebc0ab59a888fba15136eb4a0ee2790e1 (diff) |
Put color index attribute into the 6th attribute slot.
Update a lot of loops, conditionals to use the _TNL_FIRST/LAST_* values
instead of specific vertex attributes.
Remove the EdgeFlagv function from the GLvertexformat struct.
Diffstat (limited to 'src/mesa/tnl/t_context.h')
-rw-r--r-- | src/mesa/tnl/t_context.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index 7a80e3477c..6c97fbb7c8 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -105,7 +105,7 @@ enum { _TNL_ATTRIB_COLOR0 = 3, _TNL_ATTRIB_COLOR1 = 4, _TNL_ATTRIB_FOG = 5, - _TNL_ATTRIB_SIX = 6, + _TNL_ATTRIB_COLOR_INDEX = 6, _TNL_ATTRIB_SEVEN = 7, _TNL_ATTRIB_TEX0 = 8, _TNL_ATTRIB_TEX1 = 9, @@ -143,10 +143,9 @@ enum { _TNL_ATTRIB_MAT_BACK_SHININESS = 41, _TNL_ATTRIB_MAT_FRONT_INDEXES = 42, _TNL_ATTRIB_MAT_BACK_INDEXES = 43, - _TNL_ATTRIB_INDEX = 44, - _TNL_ATTRIB_EDGEFLAG = 45, - _TNL_ATTRIB_POINTSIZE = 46, - _TNL_ATTRIB_MAX = 47 + _TNL_ATTRIB_EDGEFLAG = 44, + _TNL_ATTRIB_POINTSIZE = 45, + _TNL_ATTRIB_MAX = 46 } ; #define _TNL_ATTRIB_TEX(u) (_TNL_ATTRIB_TEX0 + (u)) @@ -155,7 +154,8 @@ enum { /* special index used for handing invalid glVertexAttribute() indices */ #define _TNL_ATTRIB_ERROR (_TNL_ATTRIB_ATTRIBUTE15 + 1) -/* Define bit ranges instead of bit masks. +/** + * Handy attribute ranges: */ #define _TNL_FIRST_PROG _TNL_ATTRIB_WEIGHT #define _TNL_LAST_PROG _TNL_ATTRIB_TEX7 @@ -197,8 +197,8 @@ struct tnl_eval2_map { struct tnl_eval { GLuint new_state; - struct tnl_eval1_map map1[_TNL_ATTRIB_INDEX + 1]; - struct tnl_eval2_map map2[_TNL_ATTRIB_INDEX + 1]; + struct tnl_eval1_map map1[_TNL_ATTRIB_EDGEFLAG + 1]; + struct tnl_eval2_map map2[_TNL_ATTRIB_EDGEFLAG + 1]; }; @@ -377,6 +377,7 @@ struct tnl_vertex_arrays * The GL_NV_vertex_program extension defines 16 extra sets of vertex * arrays which have precedent over the conventional arrays when enabled. */ + /* XXX I think the array size is wronge (47 vs. 16) */ GLvector4f Attribs[_TNL_ATTRIB_MAX]; }; @@ -419,6 +420,7 @@ struct vertex_buffer GLuint PrimitiveCount; /* Inputs to the vertex program stage */ + /* XXX This array may be too large (47 vs. 16) */ GLvector4f *AttribPtr[_TNL_ATTRIB_MAX]; /* GL_NV_vertex_program */ }; |