如何在openGL中旋转特定对象?
我的屏幕上有一些对象,只想旋转其中之一。我尝试使用 glRotatef(...) 函数,但结果是 glRotatef(...) 旋转了我的所有对象(也许旋转了相机?)。 我怎样才能只旋转一个?
我使用openGL ES 1.1
I have some objects on the screen and would like to rotate only one of them. I tried using the glRotatef(...) function but turns out glRotatef(...) rotates all my objects (rotates the camera, maybe?).
How can I rotate only one?
I use openGL ES 1.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
仅当绘制您感兴趣的几何图形时,您才需要旋转生效。
You need the rotation to be in effect only when the geometry you're interested in is being drawn.
NeHe 的教程 #4 展示了如何精确地做到这一点。
另外,您可能想看看这个:
OpenGL 旋转
Tutorial #4 from NeHe shows how to do that precisely.
Also, you might want to take a look at this:
OpenGL Rotation