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?
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
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 !