Original Post
I'm new in OpenGL programming. I want to make a bump mapped planet, but all tutorial that I have found on the web is using cube or torus as object. How can I bump map a sphere? I use GL_TRIANGLE_STRIP to draw it. My project is derived from a tutorial named 'ogl_dot3_bump_mapping'(http://www.codesampler.com/source/ogl_dot3_bump_mapping.zip). It uses cube rendered by GL_QUADS. I think the tricky part is here: void computeTangentsMatricesForEachVertex(void) { ... v1 = vector3f(vertices.x,vertices.y,vertices.z); v2 = vector3f(vertices[i+2].x,vertices[i+2].y,vertices[i+2].z); v3 = vector3f(vertices[i+1].x,vertices[i+1].y,vertices[i+1].z); createTangentSpaceVectors( &v1,&v2,&v3, vertices.tu, vertices.tv, vertices[i+2].tu, vertices[i+2].tv, vertices[i+1].tu, vertices[i+1].tv, &vTangent, &vBiNormal, &vNormal ); g_vTangents = vTangent; g_vBiNormals = vBiNormal; g_vNormals = vNormal; ... } How can I use it for GL_TRIANGLE_STRIPs? Thank!