試執行projection
z的數值沒調好模型顯示會錯誤
如下圖
調整glOrtho
void motion(int x,int y)
{
eyeX = (x-320)/320.0;
eyeY = (-240)/240.0;
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(eyeX,eyeY,eyeZ,centerX,centerY,centerZ,0,1,0);
}
轉動視角




沒有留言:
張貼留言