Single texture on multiple triangle strips

I’m just starting to get my feet wet with texture mapping and wanted to find out if it is possible to map a single texture across multiple triangle strips.

Thanks in advance for your help.


I’m just starting to get my feet wet with texture mapping and wanted to find out if it is possible to map a single texture across multiple triangle strips.

karbuckle,

there sure is. It all depends on the kind of mapping you want. For a 2D mapping, you would need to determine a good plane to project the triangles on to, one that best fits the overall orientation of the triangles, then pick the s and t axes to lie in this plane. A typical way to do this is to pick a world axis that best matches the average triangle normal, then use the other 2 world axis as the s and t vectors.

There are many other mapping as well. You could use a cylinder, sphere, cube, and so on.

The idea is to pick a single geometry to project all the triangle into, so they are all in the same texture space.

Yes, it’s certainly possible. You bind the texture first and then draw all of your triangle strips. You’re going to find that you probably need to generate your own texture coordinates however so that it ‘fits’ right.

Thanks for your helpful replies! I’ve got a better picture of what I need to do now.