【发布时间】:2013-09-26 15:50:30
【问题描述】:
所以我将对象的方向存储在 glm::fquat 中,我想用它来旋转我的模型。我该怎么做?
我试过这个:
glPushMatrix();
glTranslatef(position.x, position.y, position.z);
glMultMatrixf(glm::mat4_cast(orientation));
glCallList(modelID);
glPopMatrix();
但我收到了这个错误:
error: cannot convert 'glm::detail::tmat4x4<float>' to 'const GLfloat* {aka const float*}' for argument '1' to 'void glMultMatrixf(const GLfloat*)'|
我显然做错了什么,那么正确的做法是什么?
【问题讨论】:
标签: c++ opengl matrix quaternions glm-math