开发者

Obatining Rotation Matrix from glRotatef() in opengl

Is there a way to get the r开发者_C百科otation matrix which is generated by command glRotatef() in opengl?


No, but you can get the current matrix with glGetFloatv. If you want just the rotation matrix, I think you should compute it yourself.


float modelViewMatrix[16]; 
glGetFloatv(GL_MODELVIEW_MATRIX, modelViewMatrix);

Note: the model view matrix must be initialized to the identity matrix before calls to rotate etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜