PDA

View Full Version : Texture mapping Triangle/Quad Strips



SuperCuzz
05-28-2001, 05:55 PM
I been reading my OpenGL superbible and I was trying to understand the code which texture maps a fractal terrain. It is like this:
inside of a for loop where the values of i and j are 0-40

glTexCoord2f(50.0*i/ 40,
50.0*j/ 40);
Vertex data;

glTexCoord2f( 50.0*i+1 / 40, 50.0*j/40 );

Vertex data;

Is it standard to use looping variables to determine the value of texture coordinates when using Triangle or Quad strips, or is that just based on how you want the results to look? I'm just now learning how to use triangle and quad strips pretty good so this is new to me.