View Full Version : texture maping bitmap over many triangles
how do I map a bitmap texture representing an orhto-rectified satellite image over many triangles representing a digital elevation map. Do I have to take care of calculating the texture coordinates correspoding to each vertex myself, or is there an easier method?
02-17-2003, 01:26 PM
You could calculate the coordinates if you wanted to. Or you could simply use plane projection texture coordinate generation.
Oh, could you please elaborate a little more about the plane projection method of calculating the texture coordinates? I am an absolute beginner, please mind :-)
02-17-2003, 02:34 PM
You need to enable texture coordinate generation mode GL_OBJECT_PLANE for GL_S and GL_T. For GL_S, set p1 to some scaling factor that maps your object x space into texture coordinate s space. Do similar for GL_T, though obviously not using p1. The MSDN documentation on glTexGen is surprisingly fairly clear at explaining this particular tex gen mode.
I think I got it.. thanks a lot !
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.