diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2001-12-14 02:50:01 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2001-12-14 02:50:01 +0000 |
commit | 86b842790b720cd6b1499ce8edca8a4e9c8dc029 (patch) | |
tree | abb453fefb2beb047768c7077edc449f1d58fcef /src/mesa/array_cache | |
parent | 680522f74c8b7bf982eab1bc127269521c48a632 (diff) |
vertex program check-in
Diffstat (limited to 'src/mesa/array_cache')
-rw-r--r-- | src/mesa/array_cache/ac_context.c | 12 | ||||
-rw-r--r-- | src/mesa/array_cache/ac_import.c | 18 |
2 files changed, 15 insertions, 15 deletions
diff --git a/src/mesa/array_cache/ac_context.c b/src/mesa/array_cache/ac_context.c index 569b62b654..f5a9b4623d 100644 --- a/src/mesa/array_cache/ac_context.c +++ b/src/mesa/array_cache/ac_context.c @@ -1,4 +1,4 @@ -/* $Id: ac_context.c,v 1.5 2001/07/19 15:54:35 brianp Exp $ */ +/* $Id: ac_context.c,v 1.6 2001/12/14 02:50:57 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -46,7 +46,7 @@ static void _ac_fallbacks_init( GLcontext *ctx ) cl->Type = GL_FLOAT; cl->Stride = 0; cl->StrideB = 0; - cl->Ptr = (void *) ctx->Current.Normal; + cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_NORMAL]; cl->Enabled = 1; cl->Flags = CA_CLIENT_DATA; /* hack */ @@ -55,7 +55,7 @@ static void _ac_fallbacks_init( GLcontext *ctx ) cl->Type = GL_FLOAT; cl->Stride = 0; cl->StrideB = 0; - cl->Ptr = (void *) ctx->Current.Color; + cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; cl->Enabled = 1; cl->Flags = CA_CLIENT_DATA; /* hack */ @@ -64,7 +64,7 @@ static void _ac_fallbacks_init( GLcontext *ctx ) cl->Type = GL_FLOAT; cl->Stride = 0; cl->StrideB = 0; - cl->Ptr = (void *) ctx->Current.SecondaryColor; + cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_COLOR1]; cl->Enabled = 1; cl->Flags = CA_CLIENT_DATA; /* hack */ @@ -73,7 +73,7 @@ static void _ac_fallbacks_init( GLcontext *ctx ) cl->Type = GL_FLOAT; cl->Stride = 0; cl->StrideB = 0; - cl->Ptr = (void *) &ctx->Current.FogCoord; + cl->Ptr = (void *) &ctx->Current.Attrib[VERT_ATTRIB_FOG]; cl->Enabled = 1; cl->Flags = CA_CLIENT_DATA; /* hack */ @@ -92,7 +92,7 @@ static void _ac_fallbacks_init( GLcontext *ctx ) cl->Type = GL_FLOAT; cl->Stride = 0; cl->StrideB = 0; - cl->Ptr = (void *) ctx->Current.Texcoord[i]; + cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + i]; cl->Enabled = 1; cl->Flags = CA_CLIENT_DATA; /* hack */ } diff --git a/src/mesa/array_cache/ac_import.c b/src/mesa/array_cache/ac_import.c index a2f3ceabad..35538e294c 100644 --- a/src/mesa/array_cache/ac_import.c +++ b/src/mesa/array_cache/ac_import.c @@ -1,4 +1,4 @@ -/* $Id: ac_import.c,v 1.14 2001/04/28 08:39:18 keithw Exp $ */ +/* $Id: ac_import.c,v 1.15 2001/12/14 02:50:57 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -59,9 +59,9 @@ static void reset_texcoord( GLcontext *ctx, GLuint unit ) else { ac->Raw.TexCoord[unit] = ac->Fallback.TexCoord[unit]; - if (ctx->Current.Texcoord[unit][3] != 1.0) + if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3] != 1.0) ac->Raw.TexCoord[unit].Size = 4; - else if (ctx->Current.Texcoord[unit][2] != 0.0) + else if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2] != 0.0) ac->Raw.TexCoord[unit].Size = 3; else ac->Raw.TexCoord[unit].Size = 2; @@ -104,7 +104,7 @@ static void reset_color( GLcontext *ctx ) ACcontext *ac = AC_CONTEXT(ctx); - if (ctx->Array._Enabled & _NEW_ARRAY_COLOR) { + if (ctx->Array._Enabled & _NEW_ARRAY_COLOR0) { ac->Raw.Color = ctx->Array.Color; STRIDE_ARRAY(ac->Raw.Color, ac->start); } @@ -112,7 +112,7 @@ static void reset_color( GLcontext *ctx ) ac->Raw.Color = ac->Fallback.Color; ac->IsCached.Color = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_COLOR; + ac->NewArrayState &= ~_NEW_ARRAY_COLOR0; } @@ -120,7 +120,7 @@ static void reset_secondarycolor( GLcontext *ctx ) { ACcontext *ac = AC_CONTEXT(ctx); - if (ctx->Array._Enabled & _NEW_ARRAY_SECONDARYCOLOR) { + if (ctx->Array._Enabled & _NEW_ARRAY_COLOR1) { ac->Raw.SecondaryColor = ctx->Array.SecondaryColor; STRIDE_ARRAY(ac->Raw.SecondaryColor, ac->start); } @@ -128,7 +128,7 @@ static void reset_secondarycolor( GLcontext *ctx ) ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor; ac->IsCached.SecondaryColor = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_SECONDARYCOLOR; + ac->NewArrayState &= ~_NEW_ARRAY_COLOR1; } @@ -533,7 +533,7 @@ struct gl_client_array *_ac_import_color( GLcontext *ctx, /* Can we keep the existing version? */ - if (ac->NewArrayState & _NEW_ARRAY_COLOR) + if (ac->NewArrayState & _NEW_ARRAY_COLOR0) reset_color( ctx ); /* Is the request impossible? @@ -601,7 +601,7 @@ struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx, /* Can we keep the existing version? */ - if (ac->NewArrayState & _NEW_ARRAY_SECONDARYCOLOR) + if (ac->NewArrayState & _NEW_ARRAY_COLOR1) reset_secondarycolor( ctx ); /* Is the request impossible? |