I've got currently no solution for texture mapping an icosahedron without a seam from pole to pole. The texture mapping of this primitive seems to be a common problem, which is not completely solved yet. I've made a lot of research and I've tried a lot of different approaches for generating the uv coordinates, the most nearby ( and smallest ) approach is this:
GLfloat u = 0.5f * ( 1.0f + atan2( z , x ) * ( 1 / M_PI ));
GLfloat v = acos( y ) * ( 1 / M_PI );
An icosahedron or geosphere is part of various open-source frameworks, such as jMonkeyEngine or Geist3D but none of the implementations seems to work correctly. It should be not impossible to map an unfolded rectangular texture or am I wrong? Every code snippet is welcome.
I've uploaded the Xcode project here which is built with openFrameworks 0.61 for iPhone. There are also two PNG files inside, each of them shows another seam variation.