Current impl. of Cylinder doesn't create caps correctly

Hi, I noticed that the current implementation of the Cylinder primitive doesn't create the caps correctly.

One side has the triangles wound in the wrong direction:

                if ( closed && axisCount == 0 ) {
                   tb.getIndexBuffer().put( i0++ );
                   tb.getIndexBuffer().put( i1++ );
                   tb.getIndexBuffer().put( tb.getVertexCount() - 2 );
                }
                else if ( closed && axisCount == axisSamples - 2 ) {
                   tb.getIndexBuffer().put( i2++ );
                   tb.getIndexBuffer().put( i3++ );
                   tb.getIndexBuffer().put( tb.getVertexCount() - 1 );


This should be:

                if ( closed && axisCount == 0 ) {
                   tb.getIndexBuffer().put( i0++ );
                   tb.getIndexBuffer().put( tb.getVertexCount() - 2 );
                   tb.getIndexBuffer().put( i1++ );
                }
                else if ( closed && axisCount == axisSamples - 2 ) {
                   tb.getIndexBuffer().put( i2++ );
                   tb.getIndexBuffer().put( i3++ );
                   tb.getIndexBuffer().put( tb.getVertexCount() - 1 );


The normals are also screwy, but I think the only way to get correct normals is to use a non-capped Cylinder plus 2 separate Disk primitives.
Anyway, just wanted to let you know.

Hey thanks for the catch.  I was able to fix the normals and enable inverting as well (which is what those if(true) things were all about.)  I'm not extremely happy with uvs on caps, but oh well for now…  Look for the fixes in CVS.