tnl: add some comments in render_line_loop code
authorBrian Paul <brianp@vmware.com>
Fri, 16 Oct 2015 04:30:22 +0000 (22:30 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 20 Oct 2015 18:52:40 +0000 (12:52 -0600)
And remove '(void) flags' line which is not needed.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
src/mesa/tnl/t_vb_rendertmp.h

index 44dee763594de22716ca4694a7a0f434c95584c1..4bfc6b15d3b538c76751e331d0817b818869af76 100644 (file)
@@ -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