From e01f56b3a85d1ca7ee19f1787305bb5986e16c39 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 10 Oct 2003 21:54:34 +0000 Subject: Solve the gears glitches. --- src/mesa/tnl/t_save_api.c | 2 +- src/mesa/tnl/t_vtx_api.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c index f72cde2fe4a..0f54f6583b8 100644 --- a/src/mesa/tnl/t_save_api.c +++ b/src/mesa/tnl/t_save_api.c @@ -485,7 +485,7 @@ static void _save_upgrade_vertex( GLcontext *ctx, } } - tnl->save.buffer = dest; + tnl->save.vbptr = dest; tnl->save.counter -= tnl->save.copied.nr; } } diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c index 3f693553c66..253c8560f50 100644 --- a/src/mesa/tnl/t_vtx_api.c +++ b/src/mesa/tnl/t_vtx_api.c @@ -215,29 +215,29 @@ static void _tnl_wrap_upgrade_vertex( GLcontext *ctx, if (tnl->vtx.copied.nr) { GLfloat *data = tnl->vtx.copied.buffer; - GLfloat *tmp = tnl->vtx.buffer; + GLfloat *dest = tnl->vtx.buffer; GLuint j; for (i = 0 ; i < tnl->vtx.copied.nr ; i++) { - for (j = 1 ; j < _TNL_ATTRIB_MAX ; j++) { + for (j = 0 ; j < _TNL_ATTRIB_MAX ; j++) { if (tnl->vtx.attrsz[j]) { if (j == attr) { - COPY_SZ_4V( tmp, newsz, tnl->vtx.current[attr] ); - COPY_SZ_4V( tmp, oldsz, data ); + COPY_SZ_4V( dest, newsz, tnl->vtx.current[j] ); + COPY_SZ_4V( dest, oldsz, data ); data += oldsz; - tmp += newsz; + dest += newsz; } else { GLuint sz = tnl->vtx.attrsz[j]; - COPY_SZ_4V( tmp, sz, data ); - tmp += sz; + COPY_SZ_4V( dest, sz, data ); + dest += sz; data += sz; } } } } - tnl->vtx.vbptr = tmp; + tnl->vtx.vbptr = dest; tnl->vtx.counter -= tnl->vtx.copied.nr; tnl->vtx.copied.nr = 0; } -- cgit v1.2.3