View Full Version : Problem with glTexCoord2d()

03-04-2017, 10:51 AM
Hi everyone !

I'm new to OpenGL and not an english native speaker (Don't judge me ! :p).
I'm trying to make a floor with a texture. For the moment I'm drawing a square this way :

glTexCoord2d(0, 0); glVertex3d(0, 0, 0);
glTexCoord2d(10, 0); glVertex3d(1000, 0, 0);
glTexCoord2d(10, 10); glVertex3d(1000, 0, 1000);
glTexCoord2d(0, 10); glVertex3d(0, 0, 1000);

The problem is that the texture isn't repeated ! I'm using binding from SFML, so maybe SFML doesn't allow to repeat a texture, but it seems strange...

But seems being stretched (Not on all the floor, but only on a line) instead of repeated !

Thanks for your help !

03-04-2017, 06:42 PM
It's possible that SFML is explicitly setting the wrap mode to clamp. Use glTexParameter (https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTexParameter.xml)() to set it to repeat.