OpenGL Rotations around World Origin when they should be around Local Origin

后端 未结 3 1915
时光说笑
时光说笑 2021-01-21 03:29

I\'m implementing a simple camera system in OpenGL. I set up gluPerspective under the projection matrix and then use gluLookAt on the ModelView matrix. After this I have my main

3条回答
  •  礼貌的吻别
    2021-01-21 04:25

    Swap your rotate and translate calls around :)

    Since they post-multiply the matrix stack the last the be called is the 'first' to be applied conceptually, if you care about that sort of thing.

提交回复
热议问题