伪代码:
drawScene() {
for(every 3Dobject) {
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(eye, targ, up); //is there a better way?
3Dobject[n].draw(); //this involves calling translations / rotations
}
//of course theres 2D GUI stuff to draw next
这是正确的(或至少不是非常糟糕的)方法吗?