PDA

View Full Version : easiest way to texture map a cylinder



pmr2004pmr
12-14-2004, 08:12 AM
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

plasmonster
12-14-2004, 03:39 PM
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.