b****o 发帖数: 378 | 1 比如说一个坦克履带转动,或者是彗星运动,月亮绕地球这种的运动,如何用opengl实
现,用C++ | l*f 发帖数: 218 | | b****o 发帖数: 378 | | m********a 发帖数: 1312 | 4 搞动画,简单点可以在display function里面直接一幅一幅的更新,缺点是如果显卡快
,frame更新速度就快。另外一种方法是根据时间计算物体当前位置,这样可以保证物
体运动速度独立于硬件性能。
你描述的东西似乎用scenegraph来搞更简单,自己找找这类的现成toolkit.
我知道的有个coin3D. | w***n 发帖数: 1084 | | O*******d 发帖数: 20343 | 6 Generally speaking you have to redraw the frame one after another in rapid
succession. Each frame have a little different scene. The frame refresh
rate should be at least 30 frames per second. You will need a display card
that supports OpenGL to achieve above frame rate.
In Windows, you can set up a timer when you start an animation. In the
timer callback function, you add you rendering code to draw a frame and do
your animations. | l*****s 发帖数: 125 | |
|