Texture mapping question

At this moment I just can do some simple texture mapping. I have one tubular model of a certain depth. I would like to paste a 2D image around the inside wall of the cylinder. The result needs to look similar to that 2D image when viewed straight. Do I need to consider depth value of the jpeg image to map it to the inside of the cylinder and look alike? Orcan it be done without considering the depth value? Please give me some suggestion to solve this problem.

Images don’t have depth only meshes. You can forget about where the tube is in space and just think about where each vertex would be on the image and calculate the uv value for the vertex.

I know that texture values range from (0.0, 0.0) to (1.0, 1.0). How can I establish correspondence between u,v texture values and vertices of my unstructured data. Please help me clarify a bit. I am quite new in OpenGL,just started learning.

Are you using VBOs or immediate mode?

I have never used VBO. I just use simple texture mapping. Do I need to use VBO in this case?

No you don’t need vbo’s. So you know how touse glmultitexcoord2f. Are you constructing the mesh from a formula or is it a .obj? If it is from a formula you have to understand how the verttices match to a location on the object to caclulate th uv values. If is a .obj put it into Blender and let it create the uvs for the decal or use something like uvmapper (http://www.uvmapper.com/)

Actually I was thinking whether the texture image can be mapped in a different way. The image can be divided into a number of contours as shown in the figure (attached). Then grdually map it (from ouside towards inside) along the depth of the shell to get look alike effect. Can texture be mapped in that way?