summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2005-05-03 15:11:23 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2005-05-03 15:11:23 +0000
commit884b5ade869de84a80ae6625458f8cc7afba9081 (patch)
tree999aa560835de854cc9b8c7212c58aba98f2f111 /src/mesa
parent138b7ef4d97734aea56d86c3d9add15dfa841dcf (diff)
Import all texture coordinate arrays. Import them only once.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/tnl/t_array_import.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/tnl/t_array_import.c b/src/mesa/tnl/t_array_import.c
index 39515b4b0a..7cc834ffa2 100644
--- a/src/mesa/tnl/t_array_import.c
+++ b/src/mesa/tnl/t_array_import.c
@@ -305,11 +305,10 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLint end)
VB->AttribPtr[_TNL_ATTRIB_FOG] = &tmp->FogCoord;
}
else if (index >= VERT_ATTRIB_TEX0 && index <= VERT_ATTRIB_TEX7) {
- for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
- _tnl_import_texcoord( ctx, i, GL_FALSE, GL_FALSE );
- tmp->TexCoord[i].count = VB->Count;
- VB->AttribPtr[_TNL_ATTRIB_TEX0 + i] = &tmp->TexCoord[i];
- }
+ i = index - VERT_ATTRIB_TEX0;
+ _tnl_import_texcoord( ctx, i, GL_FALSE, GL_FALSE );
+ tmp->TexCoord[i].count = VB->Count;
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + i] = &tmp->TexCoord[i];
}
else {
_tnl_constant_attrib(tnl, tmp, index);