2 liangshanxiaohan liangshanxiaohan 于 2016.09.22 21:49 提问

glutGet(GLUT_ELAPSED_TIME)获取值总是0

#include

int main()
{
int oldTimeSinceStart = 0;

while( 1 )
{
int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);
int deltaTime = timeSinceStart - oldTimeSinceStart;
oldTimeSinceStart = timeSinceStart;

 //... stuff to update using deltaTime

}
return 0;
}
比如这样一个简单的小程序,为什么我获取到的timeSinceStart值总是0

1个回答

dabocaiqq
dabocaiqq   2016.09.24 23:31
liangshanxiaohan
liangshanxiaohan 你这些我都看过了,我连代码的注释都没改,就一直是0
大约一年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片