diff options
author | Brian Paul <[email protected]> | 2000-10-20 19:54:49 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-10-20 19:54:49 +0000 |
commit | d475730357ff1595470fbe9856b2c88ad0a771ca (patch) | |
tree | 4e08bd0daca110c84d6deaeff942a5adc1076890 /src/mesa/main/varray.c | |
parent | a2d2aed64aebcce9cb3aa777628bc14a08f595aa (diff) |
Changes for multitexture > 3, code clean-ups.
Added GLboolean ctx->Texture.MultiTextureEnabled to determine when
multitexture is enabled. Eventually ctx->Texture.ReallyEnabled may
become a boolean.
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r-- | src/mesa/main/varray.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 62e5019dc92..78cff94bd00 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1,4 +1,4 @@ -/* $Id: varray.c,v 1.24 2000/10/18 15:02:59 brianp Exp $ */ +/* $Id: varray.c,v 1.25 2000/10/20 19:54:49 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -490,11 +490,18 @@ void gl_exec_array_elements( GLcontext *ctx, struct immediate *IM, #if MAX_TEXTURE_UNITS > 2 if (translate & VERT_TEX2_ANY) - (ctx->Array.TexCoordEltFunc[1])( IM->TexCoord[2], + (ctx->Array.TexCoordEltFunc[2])( IM->TexCoord[2], &ctx->Array.TexCoord[2], flags, elts, (VERT_ELT|VERT_TEX2_ANY), start, count); #endif +#if MAX_TEXTURE_UNITS > 3 + if (translate & VERT_TEX3_ANY) + (ctx->Array.TexCoordEltFunc[3])( IM->TexCoord[3], + &ctx->Array.TexCoord[3], + flags, elts, (VERT_ELT|VERT_TEX3_ANY), + start, count); +#endif for (i = start ; i < count ; i++) if (flags[i] & VERT_ELT) @@ -711,6 +718,13 @@ _mesa_DrawArrays(GLenum mode, GLint start, GLsizei count) TexCoord[2], start, n ); } #endif +#if MAX_TEXTURE_UNITS > 3 + if (required & VERT_TEX3_ANY) { + IM->v.TexCoord[3].size = TexCoord[3]->Size; + ctx->Array.TexCoordFunc[3]( IM->TexCoord[3] + VB_START, + TexCoord[3], start, n ); + } +#endif VB->ObjPtr = &IM->v.Obj; VB->NormalPtr = &IM->v.Normal; |