PDA

View Full Version : texture coordinates?



02-27-2001, 03:21 PM
How can you make a texture move from left to right? I can only move texture from top to bottom, or bottom to up.

I use 4 glTexCoord2f() calls, but I can't seem to get it to move texture from right to left!

Anyone explain why please?

Teofuzz
02-28-2001, 04:56 AM
You can use glTranslate with the texture matrix mode, without changing glTexCoord.
tFz

02-28-2001, 02:26 PM
I don't understand what you mean. How can you move just the texture (not the object) by using glTranslate?
How do I get access to texture matrix??

Bob
03-01-2001, 12:20 AM
This should do it.



glMatrixMode(GL_TEXTURE);
glPushMatrix();
glTranslatef(x, y, z);
DrawObjects();
glPopMatrix();
glMatrixMode(GL_MODELVIEW);

03-01-2001, 02:04 PM
thanks! I will try now. Is there any performance loss with this ??