PDA

View Full Version : Texture Rotation



guest
09-05-2003, 05:11 AM
I'm using the following code to rotate a texture before I draw it on a polygon:

glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glRotatef(angle, 0.0f, 1.0f, 0.0f);

The texture is repeated several times over the polygon.

The problem I have is that the texture is distorted around certain angles - specifically 0 and 180 degrees. It looks like it is 'smeared' along one axis.

Anybody know what I could be doing wrong?

Thanks for any help.

GL_ZERO
09-05-2003, 05:35 AM
Have you tried glRotatef(angle, 0.0f, 0.0f, 1.0f);?? Im guestting that you want to rotate as in a clock.

guest
09-07-2003, 10:59 PM
Yes, I have tried all combinations of glRotate but none of them do what I am trying to achieve (although they should so I am doing something wrong).