diff options
author | Brian Paul <[email protected]> | 2015-10-15 22:30:22 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2015-10-20 12:52:40 -0600 |
commit | 6cc596c66bb41cd3fa60bbf630c9ea4f661a64cc (patch) | |
tree | 1bcdbb3e067bc8da5ce8aec609c7f40a38508543 /src/mesa | |
parent | f7272032bec2e92e05e9c870e9655ca069d3d988 (diff) |
tnl: add some comments in render_line_loop code
And remove '(void) flags' line which is not needed.
Reviewed-by: Jose Fonseca <[email protected]>
Reviewed-by: Sinclair Yeh <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/tnl/t_vb_rendertmp.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_vb_rendertmp.h b/src/mesa/tnl/t_vb_rendertmp.h index 44dee763594..4bfc6b15d3b 100644 --- a/src/mesa/tnl/t_vb_rendertmp.h +++ b/src/mesa/tnl/t_vb_rendertmp.h @@ -124,19 +124,19 @@ static void TAG(render_line_loop)( struct gl_context *ctx, GLuint i; LOCAL_VARS; - (void) flags; - INIT(GL_LINE_LOOP); if (start+1 < count) { if (TEST_PRIM_BEGIN(flags)) { RESET_STIPPLE; + /* draw the first line from v[0] to v[1] */ if (ctx->Light.ProvokingVertex == GL_LAST_VERTEX_CONVENTION_EXT) RENDER_LINE( ELT(start), ELT(start+1) ); else RENDER_LINE( ELT(start+1), ELT(start) ); } + /* draw lines from v[1] to v[n-1] */ for ( i = start+2 ; i < count ; i++) { if (ctx->Light.ProvokingVertex == GL_LAST_VERTEX_CONVENTION_EXT) RENDER_LINE( ELT(i-1), ELT(i) ); @@ -145,6 +145,7 @@ static void TAG(render_line_loop)( struct gl_context *ctx, } if ( TEST_PRIM_END(flags)) { + /* draw final line from v[n-1] to v[0] (the very first vertex) */ if (ctx->Light.ProvokingVertex == GL_LAST_VERTEX_CONVENTION_EXT) RENDER_LINE( ELT(count-1), ELT(start) ); else |