diff options
author | Brian Paul <brianp@vmware.com> | 2009-06-18 22:45:57 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-06-18 22:45:57 -0600 |
commit | 601065f15389b52c084cdc46c339e15fd3b5eb25 (patch) | |
tree | 6b6c5a382a226f31717d1e7521314a2d2488f996 /src/mesa/tnl/t_vb_rendertmp.h | |
parent | c70a529d7c8dfbb7fbb194261c60aeeb75f5ee35 (diff) |
mesa: fix first provoking vertex mode for unfilled tri strips
Diffstat (limited to 'src/mesa/tnl/t_vb_rendertmp.h')
-rw-r--r-- | src/mesa/tnl/t_vb_rendertmp.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/mesa/tnl/t_vb_rendertmp.h b/src/mesa/tnl/t_vb_rendertmp.h index 29d2fa852c..75f6f55bdc 100644 --- a/src/mesa/tnl/t_vb_rendertmp.h +++ b/src/mesa/tnl/t_vb_rendertmp.h @@ -201,22 +201,28 @@ static void TAG(render_tri_strip)( GLcontext *ctx, INIT(GL_TRIANGLE_STRIP); if (NEED_EDGEFLAG_SETUP) { for (j=start+2;j<count;j++,parity^=1) { - GLuint ej2 = ELT(j-2+parity); - GLuint ej1 = ELT(j-1-parity); - GLuint ej = ELT(j); - GLboolean ef2 = EDGEFLAG_GET( ej2 ); - GLboolean ef1 = EDGEFLAG_GET( ej1 ); - GLboolean ef = EDGEFLAG_GET( ej ); + GLuint ej2, ej1, ej; + GLboolean ef2, ef1, ef; + if (ctx->Light.ProvokingVertex == GL_LAST_VERTEX_CONVENTION_EXT) { + ej2 = ELT(j-2+parity); + ej1 = ELT(j-1-parity); + ej = ELT(j); + } + else { + ej2 = ELT(j-1+parity); + ej1 = ELT(j-parity); + ej = ELT(j-2); + } + ef2 = EDGEFLAG_GET( ej2 ); + ef1 = EDGEFLAG_GET( ej1 ); + ef = EDGEFLAG_GET( ej ); if (TEST_PRIM_BEGIN(flags)) { RESET_STIPPLE; } EDGEFLAG_SET( ej2, GL_TRUE ); EDGEFLAG_SET( ej1, GL_TRUE ); EDGEFLAG_SET( ej, GL_TRUE ); - if (ctx->Light.ProvokingVertex == GL_LAST_VERTEX_CONVENTION_EXT) - RENDER_TRI( ej2, ej1, ej ); - else - RENDER_TRI( ej, ej2, ej1 ); + RENDER_TRI( ej2, ej1, ej ); EDGEFLAG_SET( ej2, ef2 ); EDGEFLAG_SET( ej1, ef1 ); EDGEFLAG_SET( ej, ef ); |