#### Archived

This topic is now archived and is closed to further replies.

# what are the parameters of glRotatef?

This topic is 6154 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

can someone tell me what the parameters of glRotatef are? thx "Those who serve no purpose, have no purpose"

##### Share on other sites
void glRotatef( GLfloat angle,
GLfloat x,
GLfloat y,
GLfloat z )

Look at this website: The OpenGL WWW Pages

Also, this post was probably unnecessary since you could have found it using any search engine.

Also, you generally don't wanna double-post in GameDev.net; it's not proper "etiquette."

If you are in search of a good search engine go to Google

EDIT: I dislike how if you don't put http:// before the line on anchors the browser thinks that you want to go to a subdirectory of the page your looking at.

Edited by - Floppy on November 16, 2001 7:13:27 PM

##### Share on other sites
i didnt mean to double post...

i dont understand the first parameter and how it works with the others, could u possibly elaborate further?

"Those who serve no purpose, have no purpose"

##### Share on other sites
x,y,z describe the vector axis that the rotation angle is supposed to rotate around. the angle is the amount.

##### Share on other sites
The angle is how much you want to rotate by. Then you want to tell it which axis to rotate on by puting a 1.0 in that field and having the others as 0.0.

So: glRotatef(1.0, 0.0, 1.0, 0.0) tells it to rotate one unit on the y axis.

To have the object to keep spinning, you would put a variable there and increment the
variable in a loop like so

float Angle = 0.0;

glRotatef(Angle, 1.0, 0.0, 0.0);
Angle += 1.0f

if(Angle == 360.0);
Angle = 0;

This would have the object keep rotating on the x axis

hope thats what you wanted

##### Share on other sites
ohhh is that what it is

thx alot guys, maybe i can understand the tuts better now

"Those who serve no purpose, have no purpose"

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5
frob
13

• 12
• 9
• 30
• 16
• 9
• ### Forum Statistics

• Total Topics
632612
• Total Posts
3007419

×