View Full Version : Oh curse you brain!

08-19-2004, 01:37 AM
Hi y'all!

I'm a bit staggered over my inability to find any docs on the subject off ... texture coordinate generation! :D

I scanned all the way from www.AAA.com (http://www.AAA.com) to www.ZZTop.com (http://www.ZZTop.com) and couldn't find a single page or document explaining how to do a cylindrical or cubic wrapping of a texture on a model :(

You know, like many 3D modelers allow you to choose between 'cylindrical', 'box', and so on..

I can do shrinkwraps and spherical texture mapping, but that's not very usefull for when I need to texture a box or a pipe. :(

Does anyone know how to do eighter of these two?

PS. Even opengl doesn't support these two (Cylindrical & Box) texcoord generation functions :( :confused:

08-19-2004, 07:13 AM
I think you don't need to use glTexGen at all. Have a look at the gluCylinder entry in the Red Book. "If texture coordinates are generated by the quadrics facility, then the t-coordinate ranges linearly from 0.0 at z=0 to 1.0 at z=height. The s texture coordinates are generated the same way as they are for a sphere."