easiest way to texture map a cylinder

I am trying to apply texture maps to cylinders. Say I allready have the textures loaded what is the simplest way to apply a texture map to a cylinder…

I have a function that draws a cylinder…

gluCylinder(quadric, 0.1, 0.1, (_3_depth[i])/3, 12, 1);

I now need to wrap the texture map around the cylinder…

Thanks

Have a look at gluQuadricTexture. It was designed with that very task in mind.

Otherwise, consider creating your own cylinder and assigning texture coordinates manually.