[osg-users] Can't update my projection matrix amnually

Robert Osfield robert.osfield at gmail.com
Thu Sep 15 09:09:31 PDT 2016


On 15 September 2016 at 16:57, Bruno Oliveira
<bruno.manata.oliveira at gmail.com> wrote:
> Hello,
>
> I just verified and it is indeed related to near and far planes.
> I am zooming my camera, and therefore, somewhere along the OSG update loops, the near and far planes will change but I don’t know what the new value is going to be.
>
> I need to reproduce that in my code, as in:
>
>>> camera->setViewMatrix(getInverseMatrix());
>>> camera->setProjectionMatrixAsPerspective(...);
>
>
> Can I somehow trigger the near/far plane recalculation?

You can't manually force a compute of the near/far planes, it happens
as part of the cull traversal as this is where the OSG can determine
what objects are in the view frustum and hence what values would be
appropriate to clamp the near and far planes so all objects are
visible.

If you don't want this computation simple switch it off as per my
previous email.

Robert.



More information about the osg-users mailing list