hello, i have a question concerning how to declare the points for a texture on a cube
to be exactly i mean the:
glTexCoord2f(x.f, y.f);
for the front side, my declaration works:
glBegin(GL_POLYGON); //Vorderseite
glNormal3f(0.0f, 0.0f, 1.0f);//normale für vorderseite
glTexCoord2f(0.0f, -1.f);
glVertex3f(-fSeitenL/2.0f,-fSeitenL/2.0f,+fSeitenL/2.0f);
glTexCoord2f(1.f, -1.f);
glVertex3f(+fSeitenL/2.0f,-fSeitenL/2.0f,+fSeitenL/2.0f);
glTexCoord2f(1.f, 0.0f);
glVertex3f(+fSeitenL/2.0f,+fSeitenL/2.0f,+fSeitenL/2.0f);
glTexCoord2f(0.0f, 0.0f);
glVertex3f(-fSeitenL/2.0f,+fSeitenL/2.0f,+fSeitenL/2.0f);
glEnd();
but for the right side, it doesn't work, i suggest i need other parameters, for glTexCoord2f, but i don't know witch one.
glBegin(GL_POLYGON); //Rechte Seite
glNormal3f(1.0f, 0.0f, 0.0f); //normale für rechte seite
glTexCoord2f(0.0f, -1.f);
glVertex3f(+fSeitenL/2.0f,-fSeitenL/2.0f,+fSeitenL/2.0f);
glTexCoord2f(1.0f, -1.f);
glVertex3f(+fSeitenL/2.0f,-fSeitenL/2.0f,-fSeitenL/0.0f);
glTexCoord2f(1.0f, 0.0f);
glVertex3f(+fSeitenL/2.0f,+fSeitenL/2.0f,-fSeitenL/0.0f);
glTexCoord2f(0.0f, 0.0f);
glVertex3f(+fSeitenL/2.0f,+fSeitenL/2.0f,+fSeitenL/0.0f);
glEnd();
after all i close the "texture-declaration with"
glDisable(GL_TEXTURE_2D);
thanks in advance
edit:
the frontside is shown with the picture, the other side isn't shown, not even the "cubeside". for now i just use a picture that's black with some random white spaces, so the exactly position is not that much importent, despite that i'm very interessted how to set the glTexCoord2f right.