Hi,
I’m trying to add a jpeg texture to my project but it only work on 2 sides of my shape. On the other sides it appears to be like stretched and I don’t understand why… Normally my texture should be the same on every sides.
You can see what I’m talking about if you follow this link : http://img573.imageshack.us/i/testd.png/
That’s the link to my texture (552 x 463) : http://img816.imageshack.us/i/fenetre1.jpg/
And here’s the code where I define where the texture will be applied :
for (i = 0; i < 6; i++)
{
glBegin(GL_QUADS);
glNormal3fv(tabSommet[facette[i][0]]);
glNormal3fv(tabSommet[facette[i][1]]);
glNormal3fv(tabSommet[facette[i][2]]);
glNormal3fv(tabSommet[facette[i][3]]);
glTexCoord3fv(tabSommet[facette[i][0]]); glVertex3fv(tabSommet[facette[i][0]]);
glTexCoord3fv(tabSommet[facette[i][1]]); glVertex3fv(tabSommet[facette[i][1]]);
glTexCoord3fv(tabSommet[facette[i][2]]); glVertex3fv(tabSommet[facette[i][2]]);
glTexCoord3fv(tabSommet[facette[i][3]]); glVertex3fv(tabSommet[facette[i][3]]);
}
glEnd();
}
Hope you can help me