Perspective Projection with OpenGL

后端 未结 3 867
庸人自扰
庸人自扰 2021-02-08 14:44

I am confused about perspective projection.

Here is the scenario that is confusing me. My frustrum\'s front plane is basically positioned at at positive z-axis and the b

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-08 15:24

    So, in the above case what is the behavior that I should expect for the glFrustum with a negative as well as positive value for z. i.e. in this case -10 to +10.

    Broken. You should expect the behavior to be broken.

    The documentation is quite clear on this:

    nearVal, farVal: Specify the distances to the near and far depth clipping planes. Both distances must be positive.

    (emphasis added)

    Passing a negative number (or zero) for these values will produce badness.

提交回复
热议问题