View Full Version : Auto texture map for arbitrary object.
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, 12:06 PM
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.
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.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.