I hate to do this but I would rather look bad as a person than taint Wine with imperfect code.
Thus, I will please ask to hold my very own patch for the moment.
I don't honestly know that there is a better way to come up with indices but I have some ideas, mainly looking at: http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/sphere_cylinder/ http://sol.gfxile.net/sphere/index.html
Basically this would involve, rather than creating vertices & indices like we do now, creating _all_ the vertices (with duplications) and then collapsing to vertices + indices.
We would have to allocate larger structures, but this may indeed solve the problem that Henri was referring to and make the index code cleaner.
In any case, it would also help me take my mind off teapot ;)
Thank you and hopefully you will see a better patch from me on Monday.
If not, then I don't have a better one :(
Misha