Applying a texture to a sphere created by hand

Hi there,

I’ve created a sphere by hand (using VBOs and IBO) and now I wanna generate texture coordinates to apply to it a 2D texture.

But I’ve a doubt: the vertices at the Greenwich meridian overlaps for the first and last triangle in each parallel. In the following link you can see a picture showing what I mean http://www.flickr.com/photos/59622706@N08/5448813110/. The yellow vertices and the green vertex are the vertices of the first triangle and the red vertices and the green vertex are the vertices of the last triangle at the same parallel. As you can see the green vertex is common for both triangles.

The question is how can I specify that the green vertex has texture coordinate 1 for the last triangle if I said before that it has coordinate 0 for the first triangle?

Thank you very much

The question is how can I specify that the green vertex has texture coordinate 1 for the last triangle if I said before that it has coordinate 0 for the first triangle?

You don’t; you have to duplicate the positions. You have to have one vertex that uses the position coupled with texture coordinate 0, and another vertex that uses the same position, but with texture coordinate 1.