Tiled textures?

How do i do it?? I have been told that you can do this when you are initially binding them, but i cant figure out how?

When I tile a texture, I use the glTexCoord2i() function to change how often the texture is repeated.

unsigned int repeats = 2;

glBegin(GL_QUADS);
glTexCoord2i(0, 0);
glVertex3f(-1.0f,-1.0f, 0.0f);
glTexCoord2i(repeats, 0);
glVertex3f( 1.0f,-1.0f, 0.0f);
glTexCoord2i(repeats, repeats);
glVertex3f( 1.0f, 1.0f, 0.0f);
glTexCoord2i(0, repeats);
glVertex3f(-1.0f, 1.0f, 0.0f);
glEnd();

What Antiox said is true for rendering. When you first create your texture object, you want to use glTexParameter to set up the way that OGL handles your texture coordinates:

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);

I think that OGL defaults to GL_REPEAT, but it’s not a bad idea to use these lines of code anyway, just for safety’s sake.