I am trying to apply a texture to an array of vertices using the following code:
glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glColor3f(1.0f, 1.0f, 1.0f); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnableClientState(GL_VERTEX_ARRAY); glTexCoordPointer(2, GL_FLOAT, 0, texcoords); glVertexPointer(3, GL_FLOAT, 0, vertices); glDrawElements(GL_QUADS, 12, GL_UNSIGNED_BYTE, faceIndices); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_COLOR_ARRAY); glDisable(GL_TEXTURE_2D);
with this texture: 
so i have this result: 
Now I'm wondering how I can scale the texture of the floor, I already tried to scale the texture using Photoshop, but the result is the same, but harder.
source share