how to apply some texture to a bottle?

can anybody give me some example source code on how to apply texture to a bottle. i’ve done a bottle and i’ve apply the shading to the bottle and now i want to apply the texture to the bottle so anyone can help me?

Depends on how you have defined\created your bottle. To put it simply, assuming your bottle is `standing up’ - you can consider it to be a series of circles from base to lip. Therefore, your texture co-ordinates for vertices in each ring should linearly interpolate around each ring from 0 to 1. As you go up the bottle, you similarly linearly interpolate upwards from 0 to 1 (where 1 is the top of the bottle).

However, like I say - tell us how you create the bottle in the first place and we might be able to help some more.