I understand better how things works.
But now, i would texture a quad with a repeat factor but only with a region of a texture
So for the example, Considering that i want to use only the rectangle (0.25,0.25) x (0.75,0.75) of a texture.
But i want to repeat i 4 times on a quad that have dimension (100,100) and starting at (50,50)
i would do a things like it
// bind texture
// enable "repeat" mode
// set QUAD operation
// begin
// first vertex
glTexCoord(0.25,0.25);
glVertex2f( 50 , 50 );
// second vertex
glTexCoord(3.75,0.25);
glVertex2f( 150 , 50);
// third vertex
glTexCoord( 3.75 , 3.75 );
glVertex2f( 150 , 150);
// last vertex
glTexCoord( 0.25 , 3.75 );
glVertex2f( 50 , 150);
(the vertices order may be wrong, i do it without my dev pc)
So if i understand, it will draw like it
Horizontall i will have
[0.25 ~ 1] + [0 ~ 1 ] + [0 ~ 1 ] + [0 ~ 1 ] + [0 ~ 0.75 ]
Instead of what i want:
[0.25 ~ 0.75] + [0.25 ~ 0.75] + [0.25 ~ 0.75] + [0.25 ~ 0.75]
How can i achieve my goal ?
Thanks in advance.