2

我一直在使用 OpenGL 3.0,让我感到困惑的一件事是新的 OpenGL 如何处理视锥。如果您应该为透视计算创建自己的矩阵,您如何向 OpenGL 指定 zFar 和 zNear 平面距离是多少?你必须为此使用着色器吗?

4

1 回答 1

6

The man page for glFrustum tells you exactly the math it actually implement.

You have to implement the same math in your own code, and pass the resulting matrix to your vertex shader as a uniform.

于 2012-06-07T04:02:33.860 回答