PDA

View Full Version : Rearranging texture coordinates



Orzech
02-18-2003, 10:00 AM
Hello. I wonder If there's any way of rearranging texture coordinates (i hope i didn't make mistake in spelling). Look at the code to see what I mean :

glBegin(GL_TRIANGLE_STRIP);
glTexCoord2f(0,0);
glVertex3fv(vert[0]);
glTexCoord2f(1,0);
glVertex3fv(vert[1]);
glTexCoord2f(1,1);
glVertex3fv(vert[2]);
// So now we have one triangle
glTexCoord2f(0,1);
glVertex3f(vert[3]);
// And now the second one
glEnd();

Now look at the texture coordinates for vert[3]. It will use also tex coordinates of two last vertices. But I want some other texture coordinates for the new triangle. Is there any way I can change previous coordinates for texture without leaving glBegin/glEnd?

Thanks for any help,

Orzech

W. C. Picker
02-18-2003, 10:06 AM
siema ;)

W. C. Picker
02-18-2003, 10:14 AM
Use variables as arguments to glTexCoord()and change them every frame somehow.
Or better use
glTexCoord2fv(pointer_to_an_array_of_texture_coord s)

Orzech
02-18-2003, 12:33 PM
Originally posted by W. C. Picker:
Use variables as arguments to glTexCoord()and change them every frame somehow.
Or better use
glTexCoord2fv(pointer_to_an_array_of_texture_coord s)

Siema

I would be grateful if you could give me your e-mail http://www.opengl.org/discussion_boards/ubb/smile.gif.

Thanks