View Full Version : Texturing A Triangle Strip

05-24-2001, 05:29 AM
I have read in several places that when placing textures on a mesh, by default, the texture is on the side where the points are connected clockwise or counter-clockwise (Presently I forget the default). Other places say that you can override these defaults by using Normal Vectors. My question is that I have a Triangle Strip and I want to place a texture on it. But How would I go about doing this? Would I need one Normal Vector on the first triangle of the strip? Could I order the first 3 points in the CCW or CW positions and use the default?

05-24-2001, 05:39 AM
I dont know about vertices, where you have more than two tex coords, but in case of two it seems to be no difference in texture orientation, whenever you use Triangle Strips, Loops or Triangles. Texture orientation doesn't depend on kind of primitive.

Other thing is that backface culling depends on kind of the primitive. But when you use Triangle Strip, culling factor is changed automatically with each coming triangle. It means, that if first triangle was culled, if its points were CCW oriented, the next one would be culled, if its points would be CW oriented. So, if your strip is in the same plane, you dont need to change its normal for each coming triangle.

The order, in which triangles are determined to be front facing (by default not culled) and back facing (culled by default) is by default GL_CCW(counter-clockwise) and may be changed using glFrontFace procedure. It may be obtained using glGet with GL_FRONT_FACE parameter.
glCullFace procedure changes, which polygon will be culled: front facing or back facing. As I said before, by default back facing polygon is culled.

Hope, this will help

[This message has been edited by Randolph (edited 05-24-2001).]