Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using LWJGL and OpenGL 1.1 at this time and I was wondering what command is used to change the yaw, pitch and roll?

share|improve this question
check this out :… – Nicolas Brown Jan 16 '13 at 23:57
@Nicolas Brown I see stackexchange really covered all the subjects :). – LiquidFeline Jan 28 '13 at 9:03


glRotatef(Angle.X, 1.0f, 0.0f, 0.0f) ;
glRotatef(Angle.Y, 0.0f, 1.0f, 0.0f) ;
glRotatef(Angle.Z, 0.0f, 0.0f, 1.0f) ;

(which of those angles are 'yaw', 'pitch', and 'roll', and the order in which you apply them, will depend on which axis you're considering to be 'up')

share|improve this answer
-1: For using Euler angles without any mention of the pitfalls of this. Like Gimbal Lock and such. – Nicol Bolas Jan 18 '13 at 2:15
I didn't choose to use euler angles -- the OP did. It was explicitly a "what is the function to apply pitch/yaw/roll in this API" question, and my answer is the objectively correct answer to that question. If I'd provided an answer which said how to rotate by a quaternion or by a rotation matrix, it would not answer the question which was asked. – Trevor Powell Jan 18 '13 at 2:56
With that said, it would absolutely be appropriate to provide a "here's why you may not want to do that" note as a comment on the question. It's just not an answer to the question that was asked. – Trevor Powell Jan 18 '13 at 4:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.