What are the semantics of glRotate and glTranslate's parameters?
Posted
by
Zarkopafilis
on Game Development
See other posts from Game Development
or by Zarkopafilis
Published on 2013-11-01T14:55:08Z
Indexed on
2013/11/01
16:23 UTC
Read the original article
Hit count: 219
I have been trying to play with OpenGL after watching some tutorials and I don't understand how the glTranslatef
and glRotatef
functions work. I believe a simple picture would help me.
I understand that glTranslatef
changes the position of the "camera" (but does it change the position in wich the shapes are getting drawn)?
However, I don't understand the rotation concept at all. If I do glRotatef(1,0,0,1)
it makes my quad spin around. If I just do glRotatef(1,0,0,0)
it makes the quad smaller (further away) but if I try to rotate around the X or Y axis, I get a black screen. I don't understand the angle either. Help would be appreciated.
© Game Development or respective owner