This is interesting; I guess you're drawing the flat part of the cylinder (the part opposite the curve).  I was picturing just the curved part (so, topologically the same as renderSquare).  The only problem with this as it stands is that the normals should be different at the crease: the ones on the curved part should be pointing to X+ or X-, whereas the ones on the flat part should be pointing to Z-.  Having different normals means (at least in OpenGL) that you need separate vertices.  I'd suggest just not rendering the flat part for now.