我正在学习OpenGL,遇到了gluPerspective的问题。这是我在Init()中使用的代码:
// Calculate The Aspect Ratio Of The Window
// The parameters are:
// (view angle, aspect ration of the width to the height,
// The closest distance to the camera before it clips,
// FOV, Ratio, The farthest distance before it stops drawing)
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height, 0.5f, 3000.0f);
我的场景可以正常工作,但是一旦我离开我的物体一点点,它们就会消失(如图中的红色球)。:
![Frustrum example](https://istack.dev59.com/kjf3e.gif)
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height, 0.5f, 3000000.0f);
我的问题是:如何增加OpenGL停止绘制对象的距离?