✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Az alábbi programsorok egy szimulációs hurkot (game loop) valósítanak meg, de nem jól működik. Válassza ki a hibás sorokat:
void onIdle ( ) { // idle call back
1) float tend = 0;
2) float tstart = tend;
3) tend = glutGet(GLUT_ELAPSED_TIME)/1000;
4) avatar->ProcessInput( );
5) for(float t = tstart; t < tend; t += dt) {
6) float Dt = min(dt, tend – t);
7) for (GameObject * obj : objects) obj->Control(dt);
8) for (GameObject * obj : objects) obj->Animate(dt);
}
9) onDisplay();
}