PDA

View Full Version : glRotate3f doesn't work right!



jlebrech
09-26-2000, 04:12 AM
Whenever I want to rotate something with:

glRotate3f(angle, 0, 1, 0);

or something similar, the angle never looks
right when I compile the program.
for example if the angle is set to 90deg
it is nowhere close to the real angle.
why?

Bob
09-26-2000, 04:54 AM
What do you mean by 'never looks right when compiling'? You get a compiler warning or what?

Try using a variable angle, and increase it when you press a key or similar, then you can see how the object behave when the rotation angle increases. Or maybe you have done other transformations before that affects the result.

edotorpedo
09-26-2000, 08:35 AM
Remember that it is adviseable not to rotate the same matrix several times. If you want a rotating cube, it is better to load a new matrix everypass and rotate it with an incremental variable than incremental rotating the matrix itself.

Edo