View Full Version : Auto texture map for arbitrary object.

09-28-2004, 08:51 AM
How to automaticaly map a 2D texture to an object consisted of arbitrary number of polygons when you dont have a mapping of texture coords to polygons vertex coords?

09-28-2004, 11:06 AM
if you dont want to generate them yourself, you can use glTexGen. It has a few modes how it will create the coordinates and you can specify some planes yourself.

09-29-2004, 06:21 AM
Thats the trouble Ive encountered.
I cant properly do it, for example quadrics does it perfectly (sphere, cylinder etc. texture automaticaly applyed evenly and perfect).
I have also for example some kind of object (a shere or box like or something) and Ive done right with 1D texture auto generation but in case for 2D texture I enable both GL_S and GL_T coords but it doesnt fit properly, like it remains generating only for one coordinate?
Can anyone share a proper code snippet? pls.