diff options
author | Brian Paul <[email protected]> | 2001-01-24 00:04:58 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-01-24 00:04:58 +0000 |
commit | 74b493a5e61237de081a438e774e5d8139d4c6b7 (patch) | |
tree | a8bc94a65bacc67b9b1473f91a2bd84cd2b25937 /src/mesa/tnl/t_context.h | |
parent | 125fddc31dc9959901d9f1ece693b09f04426d48 (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_context.h')
-rw-r--r-- | src/mesa/tnl/t_context.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index 41be51e4e25..d3414be29ba 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -1,4 +1,4 @@ -/* $Id: t_context.h,v 1.11 2001/01/14 06:14:21 keithw Exp $ */ +/* $Id: t_context.h,v 1.12 2001/01/24 00:04:59 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -205,7 +205,7 @@ struct immediate GLuint Elt[IMM_SIZE]; GLubyte EdgeFlag[IMM_SIZE]; GLuint Index[IMM_SIZE]; - GLubyte SecondaryColor[IMM_SIZE][4]; + GLchan SecondaryColor[IMM_SIZE][4]; GLfloat FogCoord[IMM_SIZE]; }; @@ -214,12 +214,20 @@ struct vertex_arrays { GLvector4f Obj; GLvector3f Normal; +#if CHAN_TYPE == GL_UNSIGNED_BYTE GLvector4ub Color; + GLvector4ub SecondaryColor; +#elif CHAN_TYPE == GL_UNSIGNED_SHORT + GLvector4us Color; + GLvector4us SecondaryColor; +#elif CHAN_TYPE == GL_FLOAT + GLvector4f Color; + GLvector4f SecondaryColor; +#endif GLvector1ui Index; GLvector1ub EdgeFlag; GLvector4f TexCoord[MAX_TEXTURE_UNITS]; GLvector1ui Elt; - GLvector4ub SecondaryColor; GLvector1f FogCoord; }; @@ -260,8 +268,17 @@ typedef struct vertex_buffer GLboolean *EdgeFlag; /* VERT_EDGE */ GLvector4f *TexCoordPtr[MAX_TEXTURE_UNITS]; /* VERT_TEX_0..n */ GLvector1ui *IndexPtr[2]; /* VERT_INDEX */ + +#if CHAN_TYPE == GL_UNSIGNED_BYTE GLvector4ub *ColorPtr[2]; /* VERT_RGBA */ - GLvector4ub *SecondaryColorPtr[2]; /* VERT_SPEC_RGB */ + GLvector4ub *SecondaryColorPtr[2]; /* VERT_SPEC_RGB */ +#elif CHAN_TYPE == GL_UNSIGNED_SHORT + GLvector4us *ColorPtr[2]; /* VERT_RGBA */ + GLvector4us *SecondaryColorPtr[2]; /* VERT_SPEC_RGB */ +#elif CHAN_TYPE == GL_FLOAT + GLvector4f *ColorPtr[2]; /* VERT_RGBA */ + GLvector4f *SecondaryColorPtr[2]; /* VERT_SPEC_RGB */ +#endif GLvector1f *FogCoordPtr; /* VERT_FOG_COORD */ GLvector1f *PointSizePtr; /* VERT_POINT_SIZE */ GLmaterial (*Material)[2]; /* VERT_MATERIAL, optional */ |